Skip to content

Commit

Permalink
libselinux/src/se_linux_internal.c: include stdint.h
Browse files Browse the repository at this point in the history
Include stdint.h to avoid the following uclibc build failure raised
since version 3.6 and
cb8289c:

selinux_internal.c: In function 'reallocarray':
selinux_internal.c:25:29: error: 'SIZE_MAX' undeclared (first use in this function)
   25 |         if (size && nmemb > SIZE_MAX / size) {
      |                             ^~~~~~~~
selinux_internal.c:6:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
    5 | #include <string.h>
  +++ |+#include <stdint.h>
    6 |
selinux_internal.c:25:29: note: each undeclared identifier is reported only once for each function it appears in
   25 |         if (size && nmemb > SIZE_MAX / size) {
      |                             ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/7e627744beaa4f7fdfd488dfacbaafc074a999f7

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed May 11, 2024
1 parent 1f173f8 commit f614370
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libselinux/src/selinux_internal.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "selinux_internal.h"

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Expand Down

0 comments on commit f614370

Please sign in to comment.