Skip to content

Commit

Permalink
libcomposefs: include linux/limits.h to satisfy usage of XATTR_NAME_MAX
Browse files Browse the repository at this point in the history
XATTR_NAME_MAX is defined in linux/limits.h, but leaked by glibc since
its sys/param.h includes the former header, which is not true on musl
and leads to errors like:

	../libcomposefs/lcfs-writer.c:1688:16: error: use of undeclared identifier 'XATTR_NAME_MAX'
	 1688 |         if (namelen > XATTR_NAME_MAX) {

Include linux/limits.h explicitly to build properly on musl.

Signed-off-by: Yao Zi <[email protected]>
  • Loading branch information
ziyao233 committed Sep 26, 2024
1 parent bebc8e4 commit 322ada3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libcomposefs/lcfs-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <errno.h>
#include <string.h>
#include <linux/fsverity.h>
#include <linux/limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
Expand Down

0 comments on commit 322ada3

Please sign in to comment.