pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/libxml2



Module Name:    pkgsrc
Committed By:   sjmulder
Date:           Sat Jan 27 21:07:16 UTC 2024

Modified Files:
        pkgsrc/textproc/libxml2: Makefile

Log Message:
textproc/libxml2: Fix undefined addrinfo on glibc

On Fedora 39 (only with IPv6 enabled):

  nanoftp.c: In function 'xmlNanoFTPConnect':
  nanoftp.c:798:25: error: storage size of 'hints' isn't known
    798 |         struct addrinfo hints, *tmp, *result;
        |                         ^~~~~

netdb.h and GNU's getaddrinfo(3) show that it's behind a feature macro:

  _POSIX_C_SOURCE >= 200112L

Tested on Fedora 39 and NetBSD 9.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 pkgsrc/textproc/libxml2/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/libxml2/Makefile
diff -u pkgsrc/textproc/libxml2/Makefile:1.177 pkgsrc/textproc/libxml2/Makefile:1.178
--- pkgsrc/textproc/libxml2/Makefile:1.177      Sat Jan 27 10:06:41 2024
+++ pkgsrc/textproc/libxml2/Makefile    Sat Jan 27 21:07:16 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.177 2024/01/27 10:06:41 wiz Exp $
+# $NetBSD: Makefile,v 1.178 2024/01/27 21:07:16 sjmulder Exp $
 
 .include "../../textproc/libxml2/Makefile.common"
 
@@ -22,6 +22,9 @@ PKGCONFIG_OVERRIDE=   libxml-2.0.pc.in
 USE_LANGUAGES+=                c
 FORCE_C_STD=           c99
 
+# for struct addrinfo on glibc
+CPPFLAGS+=     -D_POSIX_C_SOURCE=200112L  
+
 TEST_TARGET=   check
 
 SUBST_CLASSES+=                rpath



Home | Main Index | Thread Index | Old Index