From d6642ab8cc934d9de12de631f5b0b3098022eb02 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Wed, 8 Feb 2023 15:34:16 +0100 Subject: [PATCH] Remove several implicit function declarations During configure, several ioctl checks omit the corresponding include and a pwritev2 check uses the wrong feature test macro. This commit fixes the same. Signed-off-by: Arjun Shankar Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- m4/package_libcdev.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index bb1ab49c1..f987aa4ab 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -117,6 +117,7 @@ AC_DEFUN([AC_HAVE_FIEMAP], #define _GNU_SOURCE #include #include +#include ]], [[ struct fiemap *fiemap; ioctl(0, FS_IOC_FIEMAP, (unsigned long)fiemap); @@ -153,7 +154,7 @@ AC_DEFUN([AC_HAVE_PWRITEV2], [ AC_MSG_CHECKING([for pwritev2]) AC_LINK_IFELSE( [ AC_LANG_PROGRAM([[ -#define _BSD_SOURCE +#define _GNU_SOURCE #include ]], [[ pwritev2(0, 0, 0, 0, 0); @@ -454,6 +455,7 @@ AC_DEFUN([AC_HAVE_SG_IO], AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([[ #include +#include ]], [[ struct sg_io_hdr hdr; ioctl(0, SG_IO, &hdr); @@ -471,7 +473,8 @@ AC_DEFUN([AC_HAVE_HDIO_GETGEO], [ AC_MSG_CHECKING([for struct hd_geometry ]) AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([[ -#include , +#include +#include ]], [[ struct hd_geometry hdr; ioctl(0, HDIO_GETGEO, &hdr); -- 2.39.5