ports/184569: math/octave-forge-paralles : fix build with gcc47

Christoph Moench-Tegeder cmt at burggraben.net
Sat Dec 7 17:00:01 UTC 2013


>Number:         184569
>Category:       ports
>Synopsis:       math/octave-forge-paralles : fix build with gcc47
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 07 17:00:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Christoph Moench-Tegeder
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD elch.exwg.net 9.2-RELEASE FreeBSD 9.2-RELEASE #11 r255911: Fri Sep 27 17:09:40 CEST 2013 cmt at elch.exwg.net:/usr/obj/usr/src/sys/ELCH amd64

lang/gcc47					gcc47-4.7.4.20131130
math/octave-forge-parallel	octave-forge-parallel-2.0.5_5

>Description:
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.

>How-To-Repeat:

>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

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\


Regards,
Christoph
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list