Skip to contentSkip to conversation

fs-tests: integrity: don't include header <bits/stdio_lim.h>

PATCH New Rahul Bedarkar 1 participant 1 message Aug 18, 2016 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs-tests: integrity: don't include header <bits/stdio_lim.h>

In commit ca7a5eda221d("integck.c: Fix buffer overflow in save_file") we started including header <bits/stdio_lim.h>.

But with musl C library, we get following build error

integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory

   #include <bits/stdio_lim.h>
                              ^

compilation terminated.
make[2]: *** [integck] Error 1

Header <bits/stdio_lim.h> is not available in musl C library. However <stdio.h> has all definition that <bits/stdio_lim.h> supposed to be providing. Moreover <bits/stdio_lim.h> shouldn't be included directly instead we should be using <stdio.h>.

Since we already include <stdio.h> and in case of uClibc or glibc <bits/stdio_lim.h> gets included internally, we can safely remove it.

This build issue is found by Buildroot autobuilder
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/

Fixes ca7a5eda221d("integck.c: Fix buffer overflow in save_file")
---
 tests/fs-tests/integrity/integck.c | 1 -
 1 file changed, 1 deletion(-)
tests/fs-tests/integrity/integck.c +0 -1
index 8badd1f..c6319fb 100644
@@ -32,7 +32,6 @@
 #include <assert.h>
 #include <mntent.h>
 #include <execinfo.h>
-#include <bits/stdio_lim.h>
 #include <sys/mman.h>
 #include <sys/vfs.h>
 #include <sys/mount.h>
Signature · 1 line
2.6.2