]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix compiler issue with mmap_internal
authorStafford Horne <shorne@gmail.com>
Thu, 28 Oct 2021 21:27:17 +0000 (06:27 +0900)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 29 Oct 2021 12:21:37 +0000 (09:21 -0300)
Compiling mmap_internal fails to compile when we use -1 for MMAP2_PAGE_UNIT
on 32 bit architectures.  The error is as follows:

    ../sysdeps/unix/sysv/linux/mmap_internal.h:30:8: error: unknown type
    name 'uint64_t'
    |
       30 | static uint64_t page_unit;
  |
  |        ^~~~~~~~

Fix by adding including stdint.h.

sysdeps/unix/sysv/linux/mmap_internal.h

index 5ca6976191137f95ba1ccb1b9df2fa5b2d720f43..35e112cc776f840f62160ca841306a63ec871d09 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef MMAP_INTERNAL_LINUX_H
 #define MMAP_INTERNAL_LINUX_H 1
 
+#include <stdint.h>
+
 /* This is the minimum mmap2 unit size accept by the kernel.  An architecture
    with multiple minimum page sizes (such as m68k) might define it as -1 and
    thus it will queried at runtime.  */