Regarding O_NOACCESS: > Using a value of 3 as the argument to open is a traditional Linux > extension for getting an fd that's usable only for ioctls. That's > reasonable. What's not reasonable or correct is using O_ACCMODE as a > way to get a 3. https://www.openwall.com/lists/musl/2014/07/01/12 --- lilo-24.2/src/common.h 2015-11-21 17:50:23.000000000 -0600 +++ lilo-24.2/src/common.h 2020-03-19 07:32:52.429998369 -0500 @@ -26,12 +26,8 @@ # define PAGE_SIZE 4096U #endif -#ifdef O_ACCMODE -# define O_NOACCESS O_ACCMODE -#else /* open a file for "no access" */ -# define O_NOACCESS 3 -#endif +#define O_NOACCESS 3 /* special for LILO, bypass the actual open in dev_open( , ,-1) */ #define O_BYPASS -1 --- lilo-24.2/src/config.h 2011-06-22 02:13:58.000000000 -0500 +++ lilo-24.2/src/config.h 2020-03-19 04:43:53.769503552 -0500 @@ -20,10 +20,6 @@ #endif #if !__MSDOS__ -#if !defined(__GLIBC__) || (__GLIBC__ < 2) || \ - !defined(__GLIBC_MINOR__) || (__GLIBC_MINOR__ < 1) -# warning "glibc version 2.1 or later is recommended" -#endif /* !__MSDOS__ */ #define TMP_DEV "/tmp/dev.%d" /* temporary devices are created here */ #define MAX_TMP_DEV 50 /* highest temp. device number */ --- lilo-24.2/src/lilo.c 2015-11-21 17:51:24.000000000 -0600 +++ lilo-24.2/src/lilo.c 2020-03-19 04:34:43.899511387 -0500 @@ -182,7 +182,6 @@ extern int has_partitions_beta(dev_t dev printf("Without"); #endif printf(" device-mapper\n"); - printf("\nglibc version %d.%d\n", __GLIBC__, __GLIBC_MINOR__); printf("Kernel Headers included from %d.%d.%d\n", LINUX_VERSION_CODE>>16, LINUX_VERSION_CODE>>8 & 255, --- lilo-24.2/src/partition.c 2015-11-21 17:50:20.000000000 -0600 +++ lilo-24.2/src/partition.c 2020-03-19 04:41:05.339505952 -0500 @@ -31,30 +31,6 @@ #include "boot.h" #include "loader.h" -#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 1 -#if defined(_syscall5) && defined(__NR__llseek) - - _syscall5(int, _llseek, unsigned int, fd, unsigned int, hi, - unsigned int, lo, lloff_t *, res, unsigned int, wh); - int _llseek(unsigned int fd, unsigned int offset_high, - unsigned int offset_low, lloff_t * result, unsigned int whence); - - lloff_t lseek64(unsigned int fd, lloff_t offs, unsigned int whence) - { lloff_t res; - return _llseek(fd, offs>>32, offs, &res, whence) < 0 ? - (lloff_t)(-1) : res; - } - -#else -/* last ditch attempt on small disks, and very old systems */ -# warning "*****************************************" -# warning "***** no 64 bit lseek is available ******" -# warning "***** using 23 bit sector addresses *****" -# warning "*****************************************" -# define lseek64 lseek -#endif -#endif - static int anywhere(unsigned char *buf, char *str) {