summaryrefslogtreecommitdiff
path: root/net-libs/udns/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-16 14:53:46 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-16 14:53:46 +0000
commitf5588424e3182e3006f725536eebd7dc7b5bbfd4 (patch)
tree2c2ccb3df6c5e1039da984d110f02d0c2ec12cf1 /net-libs/udns/files
parentd969fd257186a9d8083279276697f827331f0e46 (diff)
gentoo auto-resync : 16:12:2023 - 14:53:46
Diffstat (limited to 'net-libs/udns/files')
-rw-r--r--net-libs/udns/files/udns-0.4-configure-c99.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/net-libs/udns/files/udns-0.4-configure-c99.patch b/net-libs/udns/files/udns-0.4-configure-c99.patch
new file mode 100644
index 000000000000..cedf073fe0ff
--- /dev/null
+++ b/net-libs/udns/files/udns-0.4-configure-c99.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/874759
+https://bugs.gentoo.org/883285
+https://bugs.gentoo.org/919260
+https://src.fedoraproject.org/rpms/udns/c/27e7b66faa416c13b113e895c204373596282c37?branch=rawhide
+
+Provide autoconf-style fake prototype for socket to avoid implicit
+function declarations. Otherwise the check will always fail with soem
+C99 compilers.
+
+Avoid incorrect pointer types and a pointer-to-int conversion with
+inet_pton and inet_ntop.
+
+--- a/configure
++++ b/configure
+@@ -75,6 +75,7 @@ int main(int argc, char **argv) {
+ EOF
+
+ if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF
++char socket(void); char connect(void);
+ int main() { socket(); connect(); return 0; }
+ EOF
+ then :
+@@ -92,8 +93,8 @@ ac_ign \
+ int main() {
+ char buf[64];
+ long x = 0;
+- inet_pton(AF_INET, &x, buf);
+- return inet_ntop(AF_INET, &x, buf, sizeof(buf));
++ inet_pton(AF_INET, (void *) &x, buf);
++ return inet_ntop(AF_INET, (void *) &x, buf, sizeof(buf)) != 0;
+ }
+ EOF
+