diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-05-18 17:46:49 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-12-12 23:02:58 -0500 |
commit | d7de3f3d13cce3efce3659a4aaf86843b4a3c98e (patch) | |
tree | e69dc01c37d5630a097318a07531502a8f95afd6 | |
parent | fc8f58ed32dca6b5a95d5055a007b680fe056b4c (diff) | |
download | e2fsprogs-d7de3f3d13cce3efce3659a4aaf86843b4a3c98e.tar.gz |
Fix compilation warnings about functions declared in sys/xattr.h
attr commit v2.4.47-34-g7921157 removes <attr/xattr.h>
and syscall wrappers with the following wording:
"The xattr syscalls are provided by glibc since ages [...]
This removes the need for the <attr/xattr.h> header;
use <sys/xattr.h> instead."
Check for <sys/xattr.h> and include it to fix the following compilation
warnings:
create_inode.c: In function 'set_inode_xattr':
create_inode.c:136:9: warning: implicit declaration of function 'llistxattr' [-Wimplicit-function-declaration]
create_inode.c:172:16: warning: implicit declaration of function 'lgetxattr' [-Wimplicit-function-declaration]
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | lib/config.h.in | 3 | ||||
-rw-r--r-- | misc/create_inode.c | 4 |
4 files changed, 10 insertions, 2 deletions
@@ -7236,6 +7236,8 @@ main () if (*(data + i) != *(data3 + i)) return 14; close (fd); + free (data); + free (data3); return 0; } _ACEOF @@ -12369,7 +12371,7 @@ fi done fi -for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/major.h linux/loop.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h +for ac_header in dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h attr/xattr.h linux/falloc.h linux/fd.h linux/major.h linux/loop.h net/if_dl.h netinet/in.h sys/acl.h sys/disklabel.h sys/disk.h sys/file.h sys/ioctl.h sys/key.h sys/mkdev.h sys/mman.h sys/mount.h sys/prctl.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysctl.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h sys/xattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index dd1668766..02e546b8f 100644 --- a/configure.ac +++ b/configure.ac @@ -944,6 +944,7 @@ AC_CHECK_HEADERS(m4_flatten([ sys/types.h sys/un.h sys/wait.h + sys/xattr.h ])) dnl Check where to find a dd(1) that supports iflag=fullblock dnl and oflag=append diff --git a/lib/config.h.in b/lib/config.h.in index bc006deef..90d930db9 100644 --- a/lib/config.h.in +++ b/lib/config.h.in @@ -539,6 +539,9 @@ /* Define to 1 if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the <sys/xattr.h> header file. */ +#undef HAVE_SYS_XATTR_H + /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H diff --git a/misc/create_inode.c b/misc/create_inode.c index 73dd2f215..08b4ec28d 100644 --- a/misc/create_inode.c +++ b/misc/create_inode.c @@ -18,7 +18,9 @@ #include <sys/types.h> #include <unistd.h> #include <limits.h> /* for PATH_MAX */ -#ifdef HAVE_ATTR_XATTR_H +#if defined HAVE_SYS_XATTR_H +#include <sys/xattr.h> +#elif defined HAVE_ATTR_XATTR_H #include <attr/xattr.h> #endif #include <sys/ioctl.h> |