]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 15 May 2024 16:22:11 +0000 (18:22 +0200)
committerFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 15 May 2024 16:22:11 +0000 (18:22 +0200)
Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
raised since version 2.39 and
https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:

sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
  106 |     X(PER_LINUX32_3GB) \
      |       ^~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
sys-utils/setarch.c

index 227bc6b5de3e95855688b28b37afae3de4fddb5c..4bcb5e69e67c41cf0a2568121132b4ffce765e46 100644 (file)
 # define PER_LINUX_FDPIC       (PER_LINUX | FDPIC_FUNCPTRS)
 #endif
 
+/* fallback for old uclibc-headers < 1.0.39 */
+#ifndef PER_LINUX32_3GB
+# define PER_LINUX32_3GB       (PER_LINUX32 | ADDR_LIMIT_3GB)
+#endif
+
 #define ALL_PERSONALITIES \
     X(PER_LINUX) \
     X(PER_LINUX_32BIT) \