]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Include errno.h within lsfd.c
authorMark Harfouche <mark.harfouche@gmail.com>
Mon, 13 Jan 2025 23:07:20 +0000 (18:07 -0500)
committerGitHub <noreply@github.com>
Mon, 13 Jan 2025 23:07:20 +0000 (18:07 -0500)
This is needed for ENOSYS to be defined

libgcc:           14.2.0

```
2025-01-13T22:59:57.1752408Z misc-utils/lsfd.c: In function 'kcmp':
2025-01-13T22:59:57.1762407Z misc-utils/lsfd.c:66:9: error: 'errno' undeclared (first use in this function)
2025-01-13T22:59:57.1762947Z    66 |         errno = ENOSYS;
2025-01-13T22:59:57.1770931Z       |         ^~~~~
2025-01-13T22:59:57.1771263Z misc-utils/lsfd.c:40:1: note: 'errno' is defined in header '<errno.h>'; did you forget to '#include <errno.h>'?
2025-01-13T22:59:57.1771555Z    39 | #include <sys/syscall.h>
2025-01-13T22:59:57.1771767Z   +++ |+#include <errno.h>
2025-01-13T22:59:57.1771955Z    40 |
2025-01-13T22:59:57.1772231Z misc-utils/lsfd.c:66:9: note: each undeclared identifier is reported only once for each function it appears in
2025-01-13T22:59:57.1772507Z    66 |         errno = ENOSYS;
2025-01-13T22:59:57.1772684Z       |         ^~~~~
2025-01-13T22:59:57.1779860Z misc-utils/lsfd.c:66:17: error: 'ENOSYS' undeclared (first use in this function)
2025-01-13T22:59:57.1780285Z    66 |         errno = ENOSYS;
2025-01-13T22:59:57.1780499Z       |                 ^~~~~~
2025-01-13T22:59:57.2204441Z   CC       misc-utils/lsfd-lsfd-decode-file-flags.o
2025-01-13T22:59:57.2803898Z make[2]: *** [Makefile:13624: misc-utils/lsfd-lsfd.o]
```

lsfd-cmd/lsfd.c

index 77a7a0c22ccd53eea999ecf7926b09b54dedd14e..c10f0758bdb10285e1220236d5a63331601334af 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/uio.h>
 #include <linux/sched.h>
 #include <sys/syscall.h>
+#include <errno.h>
 
 #ifdef HAVE_LINUX_KCMP_H
 #  include <linux/kcmp.h>