Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Drop architecture-specific ENOTSUP define

parisc is the only Linux architecture which has defined a value for ENOTSUP.
All other architectures #define ENOTSUP as EOPNOTSUPP in their libc headers.

Having an own value for ENOTSUP which is different than EOPNOTSUPP often gives
problems with userspace programs which expect both to be the same. One such
example is a build error in the libuv package, as can be seen in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900237.

Since we dropped HP-UX support, there is no real benefit in keeping an own
value for ENOTSUP. This patch drops the parisc value for ENOTSUP from the
kernel sources. glibc needs no patch, it reuses the exported headers.

Signed-off-by: Helge Deller <deller@gmx.de>

+2 -13
-1
arch/parisc/include/uapi/asm/errno.h
··· 113 113 #define ELOOP 249 /* Too many symbolic links encountered */ 114 114 #define ENOSYS 251 /* Function not implemented */ 115 115 116 - #define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */ 117 116 #define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */ 118 117 #define ECANCELED ECANCELLED /* SuSv3 and Solaris wants one 'L' */ 119 118
+2 -11
kernel/time/posix-timers.c
··· 86 86 #endif 87 87 88 88 /* 89 - * parisc wants ENOTSUP instead of EOPNOTSUPP 90 - */ 91 - #ifndef ENOTSUP 92 - # define ENANOSLEEP_NOTSUP EOPNOTSUPP 93 - #else 94 - # define ENANOSLEEP_NOTSUP ENOTSUP 95 - #endif 96 - 97 - /* 98 89 * The timer ID is turned into a timer address by idr_find(). 99 90 * Verifying a valid ID consists of: 100 91 * ··· 1211 1220 if (!kc) 1212 1221 return -EINVAL; 1213 1222 if (!kc->nsleep) 1214 - return -ENANOSLEEP_NOTSUP; 1223 + return -EOPNOTSUPP; 1215 1224 1216 1225 if (get_timespec64(&t, rqtp)) 1217 1226 return -EFAULT; ··· 1238 1247 if (!kc) 1239 1248 return -EINVAL; 1240 1249 if (!kc->nsleep) 1241 - return -ENANOSLEEP_NOTSUP; 1250 + return -EOPNOTSUPP; 1242 1251 1243 1252 if (compat_get_timespec64(&t, rqtp)) 1244 1253 return -EFAULT;
-1
tools/arch/parisc/include/uapi/asm/errno.h
··· 113 113 #define ELOOP 249 /* Too many symbolic links encountered */ 114 114 #define ENOSYS 251 /* Function not implemented */ 115 115 116 - #define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */ 117 116 #define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */ 118 117 #define ECANCELED ECANCELLED /* SuSv3 and Solaris wants one 'L' */ 119 118