Bug 184569 - math/octave-forge-parallel : fix build with gcc47
math/octave-forge-parallel : fix build with gcc47
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Stephen Montgomery-Smith
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-07 17:00 UTC by cmt
Modified: 2013-12-12 20:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cmt 2013-12-07 17:00:01 UTC
Hi,

in an effort towards upgrading lang/gcc to gcc 4.7, I'm helping gerald@
in making ports gcc47-safe.
Please consider the following patch to your port. If you approve of the
patch, gerald@ has offered his help in commiting it.
If you're commiting yourself or have someone else commit this (or
another patch to the same effect), can you please add an additional
reference to ports/183342 in the commit message?
In my test environment, the port built successfully with lang/gcc47.

Fix: GCC 4.7 dows not include sys/types.h and unistd.h on it's own anymore.


# add sys/types.h and unistd.h in a number of files
$ svn status
A       files/patch-connect.cc
A       files/patch-pserver.cc
A       files/patch-recv.c
A       files/patch-send.cc



Regards,
Christoph--xKbI1JbPzd6deWogXwk0kI5fQ99F1bQDX3ExzuyXrIE2vdeh
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: files/patch-connect.cc
===================================================================
--- files/patch-connect.cc	(revision 0)
+++ files/patch-connect.cc	(working copy)
@@ -0,0 +1,12 @@
+--- connect.cc.orig	2013-11-16 22:26:59.000000000 +0100
++++ connect.cc	2013-11-16 22:27:54.000000000 +0100
+@@ -25,7 +25,9 @@
+ #include <octave/oct.h>
+ #include <oct-env.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
++#include <unistd.h>
+ #include <errno.h>
+ #include <netdb.h>
+ #include <netinet/in.h> // reported necessary for FreeBSD-8
Index: files/patch-pserver.cc
===================================================================
--- files/patch-pserver.cc	(revision 0)
+++ files/patch-pserver.cc	(working copy)
@@ -0,0 +1,19 @@
+--- pserver.cc.orig	2013-11-16 22:30:37.000000000 +0100
++++ pserver.cc	2013-11-16 22:31:47.000000000 +0100
+@@ -27,6 +27,7 @@
+ #include <cmd-edit.h>
+ #include <toplev.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <iostream>
+ #include <sys/stat.h>
+@@ -34,6 +35,8 @@
+ #include <errno.h>
+ #include <netdb.h>
+ #include <netinet/in.h> // reported necessary for FreeBSD-8
++#include <unistd.h>
++#include <stdlib.h>
+ 
+ #include "sock-stream.h"
+ 
Index: files/patch-recv.c
===================================================================
--- files/patch-recv.c	(revision 0)
+++ files/patch-recv.c	(working copy)
@@ -0,0 +1,14 @@
+--- recv.cc.orig	2013-11-16 22:29:55.000000000 +0100
++++ recv.cc	2013-11-16 22:30:24.000000000 +0100
+@@ -22,9 +22,11 @@
+ #include <octave/oct-stream.h>
+ #include <octave/oct-map.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <netinet/in.h>
++#include <unistd.h>
+ #include <netdb.h>
+ 
+ 
Index: files/patch-send.cc
===================================================================
--- files/patch-send.cc	(revision 0)
+++ files/patch-send.cc	(working copy)
@@ -0,0 +1,15 @@
+--- send.cc.orig	2013-11-16 22:35:29.000000000 +0100
++++ send.cc	2013-11-16 22:35:56.000000000 +0100
+@@ -21,10 +21,12 @@
+ #include <octave/ls-oct-binary.h>
+ #include <octave/oct-stream.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
++#include <unistd.h>
+ 
+ 
+ DEFUN_DLD (send, args, , "send (X, sockets)\n\
Comment 1 gerald 2013-12-07 23:01:15 UTC
Apologies, the PR to reference should have been 182136.

Gerald
Comment 2 Gerald Pfeifer freebsd_committer 2013-12-12 16:38:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stephen

Fix port name and assign to maintainer.
Comment 3 dfilter freebsd_committer 2013-12-12 20:01:06 UTC
Author: stephen
Date: Thu Dec 12 20:00:58 2013
New Revision: 336286
URL: http://svnweb.freebsd.org/changeset/ports/336286

Log:
  - Fix build with gcc47.
  
  PR:		ports/184569
  Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net>
  Reference:	ports/183342

Added:
  head/math/octave-forge-parallel/files/patch-connect.cc   (contents, props changed)
  head/math/octave-forge-parallel/files/patch-pserver.cc   (contents, props changed)
  head/math/octave-forge-parallel/files/patch-recv.c   (contents, props changed)
  head/math/octave-forge-parallel/files/patch-send.cc   (contents, props changed)

Added: head/math/octave-forge-parallel/files/patch-connect.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-parallel/files/patch-connect.cc	Thu Dec 12 20:00:58 2013	(r336286)
@@ -0,0 +1,12 @@
+--- connect.cc.orig	2013-11-16 22:26:59.000000000 +0100
++++ connect.cc	2013-11-16 22:27:54.000000000 +0100
+@@ -25,7 +25,9 @@
+ #include <octave/oct.h>
+ #include <oct-env.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
++#include <unistd.h>
+ #include <errno.h>
+ #include <netdb.h>
+ #include <netinet/in.h> // reported necessary for FreeBSD-8

Added: head/math/octave-forge-parallel/files/patch-pserver.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-parallel/files/patch-pserver.cc	Thu Dec 12 20:00:58 2013	(r336286)
@@ -0,0 +1,19 @@
+--- pserver.cc.orig	2013-11-16 22:30:37.000000000 +0100
++++ pserver.cc	2013-11-16 22:31:47.000000000 +0100
+@@ -27,6 +27,7 @@
+ #include <cmd-edit.h>
+ #include <toplev.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <iostream>
+ #include <sys/stat.h>
+@@ -34,6 +35,8 @@
+ #include <errno.h>
+ #include <netdb.h>
+ #include <netinet/in.h> // reported necessary for FreeBSD-8
++#include <unistd.h>
++#include <stdlib.h>
+ 
+ #include "sock-stream.h"
+ 

Added: head/math/octave-forge-parallel/files/patch-recv.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-parallel/files/patch-recv.c	Thu Dec 12 20:00:58 2013	(r336286)
@@ -0,0 +1,14 @@
+--- recv.cc.orig	2013-11-16 22:29:55.000000000 +0100
++++ recv.cc	2013-11-16 22:30:24.000000000 +0100
+@@ -22,9 +22,11 @@
+ #include <octave/oct-stream.h>
+ #include <octave/oct-map.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <netinet/in.h>
++#include <unistd.h>
+ #include <netdb.h>
+ 
+ 

Added: head/math/octave-forge-parallel/files/patch-send.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-parallel/files/patch-send.cc	Thu Dec 12 20:00:58 2013	(r336286)
@@ -0,0 +1,15 @@
+--- send.cc.orig	2013-11-16 22:35:29.000000000 +0100
++++ send.cc	2013-11-16 22:35:56.000000000 +0100
+@@ -21,10 +21,12 @@
+ #include <octave/ls-oct-binary.h>
+ #include <octave/oct-stream.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
++#include <unistd.h>
+ 
+ 
+ DEFUN_DLD (send, args, , "send (X, sockets)\n\
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Stephen Montgomery-Smith freebsd_committer 2013-12-12 20:25:00 UTC
State Changed
From-To: open->closed

Committed, thanks.