]> sigrok.org Git - libsigrok.git/commitdiff
hardware/beaglelogic: Don't include incorrect header <sys/errno.h>
authorJ. Neuschäfer <redacted>
Wed, 14 May 2025 12:27:47 +0000 (12:27 +0000)
committerSoeren Apel <redacted>
Sun, 9 Nov 2025 01:10:03 +0000 (02:10 +0100)
The libc's errno API[1] comes from <errno.h>, not <sys/errno.h>.
On musl-libc, a warning is produced when the latter is used:

In file included from src/hardware/beaglelogic/beaglelogic.h:26,
                 from src/hardware/beaglelogic/protocol.c:33:
/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp]
    1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
      |  ^~~~~~~

Is it not necessary to change <sys/errno.h> to <errno.h>, because
individual C files in the beaglelogic driver already include <errno.h>.

[1]: https://en.cppreference.com/w/c/error/errno

src/hardware/beaglelogic/beaglelogic.h

index 2150032cfa455b1ea5517798962b400e4fa5c703..d094c62b37c3a0d745526c6d52040cc3e05c614f 100644 (file)
@@ -23,7 +23,6 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <sys/types.h>
-#include <sys/errno.h>
 #include <sys/ioctl.h>
 #include <stdlib.h>
 #include <unistd.h>