~/work/lustre/lustre-release$ git log -p efc5c8d4de60 -- lustreAuthor: Lai Siyao <lai.siyao@whamcloud.com>
Date: Thu Dec 1 03:17:00 2022 -0500
LU-16335 build: remove _GNU_SOURCE dependency in lustre_user.h
The lustre_user.h header uses the non-standard strchrnul() function
in userspace. This will always leads to LC_IOC_REMOVE_ENTRY configure
check to fail, and in the end "lfs rm_entry" always returns -ENOTSUP.
Implement an alternative approach to avoid external dependencies on
the lustre_user.h header. Also, LC_IOC_REMOVE_ENTRY is itself
unnecessary, the code can check for LL_IOC_REMOVE_ENTRY directly.
Replace the NFS-specific -ENOTSUP error return code with -EOPNOTSUPP.
Fix the compile test_400[ab] checks to not use "-std=c99" to verify
that the uapi headers are usable without this dependency.
...
diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h
index 1b1e60acf805..36e1e70b9224 100644
--- a/lustre/include/uapi/linux/lustre/lustre_user.h
+++ b/lustre/include/uapi/linux/lustre/lustre_user.h
@@ -2033,7 +2033,11 @@ static inline char *changelog_rec_name(const struct changelog_rec *rec)
static inline char *changelog_rec_sname(const struct changelog_rec *rec)
{
- return strchrnul(changelog_rec_name(rec), '\0') + 1;
+ char *str = changelog_rec_name(rec);
+
+ while (*str != '\0')
+ str++;
+ return str + 1;
}
All patches landed.