]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix build failure on AIX
authorPádraig Brady <P@draigBrady.com>
Thu, 16 Apr 2026 21:02:03 +0000 (22:02 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 16 Apr 2026 21:05:13 +0000 (22:05 +0100)
* m4/jm-macros.m4: AIX has a splice() function for TCP,
so check for vmsplice() instead.
* src/splice.h: Define HAVE_SPLICE if vmsplice available.
Reported by Bruno Haible.

m4/jm-macros.m4
src/splice.h

index fbf0827039d615e2c3160e34d2c0578d9de47f38..fb00f9faf29a8c0eddd63672b79fdb7ae6f4746c 100644 (file)
@@ -70,7 +70,7 @@ AC_DEFUN([coreutils_MACROS],
     setgroups
     sethostname
     siginterrupt
-    splice
+    vmsplice
     sync
     sysinfo
     tcgetpgrp
index 1fb55054de4a0d0dbf69a91d993e328015ddc8fb..c146563f70104f21b48e92b60f0ef6e8dd494b36 100644 (file)
 #ifndef SPLICE_H
 # define SPLICE_H 1
 
-# if HAVE_SPLICE
+# if HAVE_VMSPLICE
+
+/* splice() and vmsplice() were introduced at the same time,
+   so assume splice() is available.  Note AIX also has a different
+   splice() which is why we don't explicitly check for that function. */
+#  define HAVE_SPLICE 1
 
 /* Empirically determined pipe size for best throughput.
    Needs to be <= /proc/sys/fs/pipe-max-size  */