[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#664470: proxytunnel: FTBFS on kfreebsd-* and hurd



Package: src:proxytunnel
Version: 1.9.0-3
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org

Hi,

Something weird in the Makefile causes this error on kfreebsd and hurd
builds:

> cc -Wall -O2 -ggdb -DREV=0 -DHAVE_GETOPT_LONG -DUSE_SSL -DSETPROCTITLE -DSPT_TYPE=2 -DSO_REUSEPORT -c -o proxytunnel.o proxytunnel.c
> In file included from /usr/include/i386-kfreebsd-gnu/sys/socket.h:40:0,
>                  from /usr/include/netinet/in.h:25,
>                  from proxytunnel.c:28:
> /usr/include/i386-kfreebsd-gnu/bits/socket.h:345:5: error: expected identifier before numeric constant
> proxytunnel.c: In function ‘do_daemon’:
> proxytunnel.c:190:36: error: ‘SO_REUSEPORT’ undeclared (first use in this function)
> proxytunnel.c:190:36: note: each undeclared identifier is reported only once for each function it appears in
> make: *** [proxytunnel.o] Error 1

By defining SO_REUSEPORT in the compile options, the sys/socket.h header
is unable to properly define it.

I think that hack was originally meant to help with Cygwin builds.  But
I've tried removing it (please see attached patch), and that fixes the
build on kfreebsd-i386 and still builds fine on (Linux) amd64 and so
probably all of the Debian target architecures.  Please consider
applying it.

Thanks,
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
Index: proxytunnel-1.9.0/Makefile
===================================================================
--- proxytunnel-1.9.0.orig/Makefile	2012-03-18 00:28:46.000000000 +0000
+++ proxytunnel-1.9.0/Makefile	2012-03-18 00:28:56.000000000 +0000
@@ -16,9 +16,6 @@
 # Most systems
 OPTFLAGS += -DSETPROCTITLE -DSPT_TYPE=2
 
-# Comment if you don't have this flag
-OPTFLAGS += -DSO_REUSEPORT
-
 # System dependant blocks... if your system is listed below, uncomment
 # the relevant lines
 

Reply to: