[MacPorts] #51708: libassuan @2.4.2 does not build on PPC Tiger, Mac OS X 10.4.11 because of macro INADDR_LOOPBACK inside #ifndef _POSIX_C_SOURCE

MacPorts noreply at macports.org
Sat Jun 25 00:43:29 PDT 2016


#51708: libassuan @2.4.2 does not build on PPC Tiger, Mac OS X 10.4.11 because of
macro INADDR_LOOPBACK inside #ifndef _POSIX_C_SOURCE
-----------------------------+--------------------------------
 Reporter:  Peter_Dyballa@…  |      Owner:  macports-tickets@…
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.3.4
 Keywords:                   |       Port:  libassuan
-----------------------------+--------------------------------
 This is the error:

 {{{
 :info:build /bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin
 /gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I.. -I/opt/local/include
 -I/opt/local/include  -pipe -Os -arch ppc -Wall -Wcast-align -Wshadow
 -Wstrict-prototypes -Wpointer-arith -MT libassuan_la-assuan-socket.lo -MD
 -MP -MF .deps/libassuan_la-assuan-socket.Tpo -c -o libassuan_la-assuan-
 socket.lo `test -f 'assuan-socket.c' || echo './'`assuan-socket.c
 :info:build libtool: compile:  /opt/local/bin/gcc-apple-4.2
 -DHAVE_CONFIG_H -I. -I.. -I.. -I/opt/local/include -I/opt/local/include
 -pipe -Os -arch ppc -Wall -Wcast-align -Wshadow -Wstrict-prototypes
 -Wpointer-arith -MT libassuan_la-assuan-socket.lo -MD -MP -MF .deps
 /libassuan_la-assuan-socket.Tpo -c assuan-socket.c  -fno-common -DPIC -o
 .libs/libassuan_la-assuan-socket.o
 :info:build assuan-socket.c: In function 'socks5_connect':
 :info:build assuan-socket.c:732: error: 'INADDR_LOOPBACK' undeclared
 (first use in this function)
 :info:build assuan-socket.c:732: error: (Each undeclared identifier is
 reported only once
 :info:build assuan-socket.c:732: error: for each function it appears in.)
 :info:build make[3]: *** [libassuan_la-assuan-socket.lo] Error 1
 :info:build make[3]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_libassuan/libassuan/work/libassuan-2.4.2/src'
 }}}

 When the source file is compiled these C header files are included:

 {{{
 . ../config.h
 . /usr/include/stdio.h
 .. /usr/include/_types.h
 ... /usr/include/sys/_types.h
 .... /usr/include/sys/cdefs.h
 .... /usr/include/machine/_types.h
 ..... /usr/include/ppc/_types.h
 . /usr/include/stdlib.h
 .. /usr/include/sys/wait.h
 ... /usr/include/sys/signal.h
 .... /usr/include/sys/appleapiopts.h
 .... /usr/include/machine/signal.h
 ..... /usr/include/ppc/signal.h
 ... /usr/include/sys/resource.h
 . /usr/include/sys/types.h
 .. /usr/include/machine/types.h
 ... /usr/include/ppc/types.h
 .... /usr/include/ppc/_types.h
 .. /usr/include/machine/endian.h
 ... /usr/include/ppc/endian.h
 . /usr/include/sys/socket.h
 .. /usr/include/machine/param.h
 ... /usr/include/ppc/param.h
 . /usr/include/netinet/in.h
 .. /usr/include/sys/_endian.h
 ... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.4/include/stdint.h
 ... /usr/include/libkern/OSByteOrder.h
 .... /usr/include/libkern/ppc/OSByteOrder.h
 .. /usr/include/netinet6/in6.h
 . /usr/include/arpa/inet.h
 .. /usr/include/sys/param.h
 ... /usr/include/sys/syslimits.h
 ... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.4/include/limits.h
 .... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.4/include/syslimits.h
 .... /usr/include/limits.h
 ..... /usr/include/machine/limits.h
 ...... /usr/include/ppc/limits.h
 ....... /usr/include/ppc/_limits.h
 . /usr/include/errno.h
 .. /usr/include/sys/errno.h
 . /usr/include/sys/stat.h
 . /usr/include/fcntl.h
 .. /usr/include/sys/fcntl.h
 . /usr/include/assert.h
 . assuan-defs.h
 .. /usr/include/sys/un.h
 .. /usr/include/unistd.h
 ... /usr/include/sys/unistd.h
 .. assuan.h
 ... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.4/include/stdarg.h
 ... /opt/local/include/gpg-error.h
 .... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.4/include/stddef.h
 . debug.h
 .. /usr/include/string.h
 .. /usr/include/inttypes.h
 }}}

 so `/usr/include/netinet/in.h` is included, but INADDR_LOOPBACK is
 excluded because of undefined guard _POSIX_C_SOURCE:

 {{{
   309   #ifndef _POSIX_C_SOURCE
   310   #define IN_CLASSA(i)            (((u_int32_t)(i) & 0x80000000) ==
 0)
   311   #define IN_CLASSA_NET           0xff000000
   312   #define IN_CLASSA_NSHIFT        24
   313   #define IN_CLASSA_HOST          0x00ffffff
   314   #define IN_CLASSA_MAX           128
   315
   316   #define IN_CLASSB(i)            (((u_int32_t)(i) & 0xc0000000) ==
 0x80000000)
   317   #define IN_CLASSB_NET           0xffff0000
   318   #define IN_CLASSB_NSHIFT        16
   319   #define IN_CLASSB_HOST          0x0000ffff
   320   #define IN_CLASSB_MAX           65536
   321
   322   #define IN_CLASSC(i)            (((u_int32_t)(i) & 0xe0000000) ==
 0xc0000000)
   323   #define IN_CLASSC_NET           0xffffff00
   324   #define IN_CLASSC_NSHIFT        8
   325   #define IN_CLASSC_HOST          0x000000ff
   326
   327   #define IN_CLASSD(i)            (((u_int32_t)(i) & 0xf0000000) ==
 0xe0000000)
   328   #define IN_CLASSD_NET           0xf0000000      /* These ones
 aren't really */
   329   #define IN_CLASSD_NSHIFT        28              /* net and host
 fields, but */
   330   #define IN_CLASSD_HOST          0x0fffffff      /* routing needn't
 know.    */
   331   #define IN_MULTICAST(i)         IN_CLASSD(i)
   332
   333   #define IN_EXPERIMENTAL(i)      (((u_int32_t)(i) & 0xf0000000) ==
 0xf0000000)
   334   #define IN_BADCLASS(i)          (((u_int32_t)(i) & 0xf0000000) ==
 0xf0000000)
   335
   336   #define INADDR_LOOPBACK         (u_int32_t)0x7f000001
   337   #define INADDR_NONE             0xffffffff              /* -1
 return */
   338
   339   #define INADDR_UNSPEC_GROUP     (u_int32_t)0xe0000000   /*
 224.0.0.0 */
   340   #define INADDR_ALLHOSTS_GROUP   (u_int32_t)0xe0000001   /*
 224.0.0.1 */
   341   #define INADDR_ALLRTRS_GROUP    (u_int32_t)0xe0000002   /*
 224.0.0.2 */
   342   #define INADDR_MAX_LOCAL_GROUP  (u_int32_t)0xe00000ff   /*
 224.0.0.255 */
   343
   344   #ifdef __APPLE__
   345   #define IN_LINKLOCALNETNUM      (u_int32_t)0xA9FE0000 /*
 169.254.0.0 */
   346   #define IN_LINKLOCAL(i)         (((u_int32_t)(i) & IN_CLASSB_NET)
 == IN_LINKLOCALNETNUM)
   347   #endif
   348
   349   #define IN_LOOPBACKNET          127                     /*
 official! */
   350   #endif  /* !_POSIX_C_SOURCE */
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/51708>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list