From b6fe0d45cf69841f631b0e3991c6a0a7d9b4c9df Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 5 May 2013 23:25:32 +0200 Subject: SYMLOOP_MAX may be undefined under some build flags * libdiskfs/boot-start.c (diskfs_start_bootstrap): Use value returned by sysconf (_SC_SYMLOOP_MAX) instead of SYMLOOP_MAX. --- libdiskfs/boot-start.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libdiskfs') diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 1e4a1c64..b62d5f30 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -237,7 +237,8 @@ diskfs_start_bootstrap () } else if (retry == FS_RETRY_MAGICAL && pathbuf[0] == '/') { - assert (init_lookups < SYMLOOP_MAX); + assert (sysconf (_SC_SYMLOOP_MAX) < 0 || + init_lookups < sysconf (_SC_SYMLOOP_MAX)); /* INITNAME is a symlink with an absolute target, so try again. */ initname = strdupa (pathbuf); -- cgit v1.2.3