mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 16:59:07 +08:00
add a simple Makefile to build and clean up
add missing macros, static inline functions, etc. add README to illustrate the purpose of this repo. Signed-off-by: Yonghong Song <yhs@fb.com>
This commit is contained in:
18
scripts/check-reallocarray.sh
Executable file
18
scripts/check-reallocarray.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#/bin/sh
|
||||
|
||||
tfile=$(mktemp /tmp/test_reallocarray_XXXXXXXX.c)
|
||||
ofile=${tfile%.c}.o
|
||||
|
||||
cat > $tfile <<EOL
|
||||
#define _GNU_SOURCE
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return !!reallocarray(NULL, 1, 1);
|
||||
}
|
||||
EOL
|
||||
|
||||
gcc $tfile -o $ofile >& /dev/null
|
||||
if [ $? -ne 0 ]; then echo "FAIL"; fi
|
||||
/bin/rm -f $tfile $ofile
|
||||
Reference in New Issue
Block a user