Hi, As I've been doing some SIP stuff recently I needed to use sip-tester wit the pcapplay feature, so had a look at the problem. In turns out that the CFLAGS are overridden, which means -D__LINUX is not passed, with all sorts of bad consequences, including this bug.
The attached patch renames the internal CFLAGS and CPPFLAGS to MYCFLAGS and MYCXXFLAGS, and add CFLAGS and CXXFLAGS to the flags passed to the compilers. Please also note that, with this flag, -DHAVE_GSL is passed as well when compiling, which means that only the part of enable_gsl.patch that modify local.mk should be actually be useful. HTH, Regis
--- sip-tester-3.1.orig/Makefile +++ sip-tester-3.1/Makefile @@ -104,7 +104,7 @@ CFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CFLAGS_Darwin=-D__DARWIN -CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) +MYCFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) #C++ Compiler Flags CPPFLAGS_hpux=-AA -mt -D__HPUX -D_INCLUDE_LONGLONG -DNOMACROS +W829 @@ -114,7 +114,7 @@ CPPFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CPPFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CPPFLAGS_Darwin=-D__DARWIN -CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) +MYCXXFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) #Linker mapping CCLINK_hpux=aCC @@ -217,10 +217,10 @@ *.o: *.h *.hpp .C.o: - $(CPP) $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $< + $(CPP) $(CXXFLAGS) $(MYCXXFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $< .cpp.o: - $(CPP) $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $< + $(CPP) $(CXXFLAGS) $(MYCXXFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $< .c.o: - $(CC) $(CFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $< + $(CC) $(CFLAGS) $(MYCFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $<