void-packages/srcpkgs/libserialport/patches/0001-Remove-termiox-as-it-h...

37 lines
1.2 KiB
Diff

Inspired by this commit from the upstream package:
https://sigrok.org/gitweb/?p=libserialport.git;a=commit;h=6f9b03e597ea7200eb616a4e410add3dd1690cb1
Applying this patch directly added some extra dependencies (autoconf,
automake), as the configure script needs to be regenerated with the
original commit.
original commit message:
termiox was removed from linux in e0efb3168d34
Some more information available in https://www.spinics.net/lists/linux-serial/msg41926.html
Attempting to use the termiox ioctls on more modern kernels results in
"Inappropriate IOCTL" errors.
While the "right" solution might be to remove the termiox code from the
linux path, simply not checking for termiox builds a libserialport that
functions on modern linux kernels.
---
diff --git a/libserialport_internal.h b/libserialport_internal.new.h
index 669152b..9a57b81 100644
--- libserialport_internal.h
+++ libserialport_internal.h
@@ -69,11 +69,6 @@
#include "linux/serial.h"
#endif
#include "linux_termios.h"
-
-/* TCGETX/TCSETX is not available everywhere. */
-#if defined(TCGETX) && defined(TCSETX) && defined(HAVE_STRUCT_TERMIOX)
-#define USE_TERMIOX
-#endif
#endif
/* TIOCINQ/TIOCOUTQ is not available everywhere. */