Package: dietlibc Version: 0.34~cvs20160606-12 Severity: important Tags: hppa
The parisc/hppa architecture was the only Linux architecture which had O_NONBLOCK defined with two bits: 00200004 Those two bits generated a few problems in the past and were originally added when the port was created to keep compatibility with HP-UX. HP-UX compatibility was never implemented, so the bits can now go. In the upcoming Linux 5.10 kernel O_NONBLOCK was changed to have only one bit set. Compat code was added so that old and new binaries will be back/forwards compatible. The relevant kernel and glibc commits are: 1. parisc: Define O_NONBLOCK to become 000200000 http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=75ae04206a4d0e4f541c1d692b7febd1c0fdb814 2. parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=44a4c9e443674e6cd3368d3e642dfe9c429d5525 3. GLIBC PATCH: Remove obsolete defines for HPUX support from fcntl.h and update O_NONBLOCK. https://sourceware.org/git?p=glibc.git;a=commit;h=a24f414ba11a7acdf3c5ccec3fb327fc72166556 Attached is the necessary patch to adjust dietlibc (and which removes unused HP-UX constants). It would be nice if you could apply it. Is there any upstream development of dietlibc where I can send it too (or will you) ? Helge
Description: Change O_NONBLOCK from 00200004 to 00200000 Change O_NONBLOCK to get more compatible to other Linux ports by just having one bit set From: Helge Deller <[email protected]> diff -up ./dietlibc-0.34~cvs20160606/include/fcntl.h.org ./dietlibc-0.34~cvs20160606/include/fcntl.h --- ./dietlibc-0.34~cvs20160606/include/fcntl.h.org 2020-11-13 18:54:10.293438218 +0000 +++ ./dietlibc-0.34~cvs20160606/include/fcntl.h 2020-11-13 19:01:28.814727531 +0000 @@ -557,18 +557,16 @@ struct flock64 { #define O_RDWR 00000002 #define O_ACCMODE 00000003 #define O_APPEND 00000010 -#define O_BLKSEEK 00000100 /* HPUX only */ #define O_CREAT 00000400 /* not fcntl */ #define O_TRUNC 00001000 /* not fcntl */ #define O_EXCL 00002000 /* not fcntl */ #define O_LARGEFILE 00004000 #define O_ASYNC 00020000 #define __O_SYNC 00100000 -#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define O_NONBLOCK 00200000 #define O_NDELAY O_NONBLOCK #define O_NOCTTY 00400000 /* not fcntl */ -#define O_DSYNC 01000000 /* HPUX only */ -#define O_RSYNC 02000000 /* HPUX only */ +#define O_DSYNC 01000000 #define O_NOATIME 04000000 #define O_CLOEXEC 010000000 #define O_DIRECTORY 00010000

