public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Disha Goel <disgoel@linux.ibm.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org, ojaswin@linux.ibm.com, ritesh.list@gmail.com
Subject: Re: [PATCH v2] xfstest: add detection for ext4.h presence in configure.ac
Date: Tue, 9 Jan 2024 16:45:51 +0530	[thread overview]
Message-ID: <8d5d57da-0140-41a1-b708-0275124096e0@linux.ibm.com> (raw)
In-Reply-To: <20240104181213.GE241128@frogsfrogsfrogs>

On 04/01/24 11:42 pm, Darrick J. Wong wrote:

>>   configure.ac      | 8 ++++++++
>>   src/ext4_resize.c | 6 +++++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index b22fc52b..76378e6d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -35,6 +35,14 @@ AC_CHECK_HEADERS([	assert.h		\
>>   			sys/mman.h		\
>>   ])
>>   
>> +AC_COMPILE_IFELSE([
>> +    AC_LANG_PROGRAM([#include <linux/ext4.h>], [])
>> +], [
>> +    AC_DEFINE([HAVE_LINUX_EXT4_H], [1], [Define if ext4.h is present])
>> +], [
>> +    AC_MSG_WARN([ext4.h not found or not compilable.])
>> +])
> AC_CHECK_HEADERS does this.
>
>> +
>>   AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
>>   #define _GNU_SOURCE
>>   #include <xfs/libxfs.h>])
>> diff --git a/src/ext4_resize.c b/src/ext4_resize.c
>> index 78b66432..51bd8d78 100644
>> --- a/src/ext4_resize.c
>> +++ b/src/ext4_resize.c
>> @@ -14,7 +14,11 @@
>>   #include <sys/ioctl.h>
>>   #include <sys/mount.h>
>>   
>> -typedef unsigned long long __u64;
>> +#ifdef HAVE_LINUX_EXT4_H
>> +#include <linux/ext4.h>
>> +#else
>> +#include <linux/types.h>
> You might as well include this unconditionally; there's no penalty
> for including it multiple times.
>
> --D

Thanks for reviewing the patch. I have addressed this in v3.

Thanks

>> +#endif
>>   
>>   #ifndef EXT4_IOC_RESIZE_FS
>>   #define EXT4_IOC_RESIZE_FS		_IOW('f', 16, __u64)
>> -- 
>> 2.39.1
>>

      reply	other threads:[~2024-01-09 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 18:42 [PATCH v2] xfstest: add detection for ext4.h presence in configure.ac Disha Goel
2024-01-04 18:12 ` Darrick J. Wong
2024-01-09 11:15   ` Disha Goel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d5d57da-0140-41a1-b708-0275124096e0@linux.ibm.com \
    --to=disgoel@linux.ibm.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox