Skip to content

Commit a15ec5e

Browse files
authored
Fixed linux compile with musl (bacnet-stack#1194)
missing include asm/ioctls.h with error 'TCGETS2' undeclared The gcc warning "overflow in conversion from 'long unsigned int' to 'int' changes value from '2150388778' to '-2144578518' " can be surrpres wtith a musl patch https://gist.github.com/stargieg/3dbfe94b5776d9dfb3e14d18ee43aade from the musl mailing list with discussion on this bug, but no solution. [PATCH] ioctl: Fix implicit constant conversion overflow https://www.openwall.com/lists/musl/2024/06/01/1
1 parent 2f6132b commit a15ec5e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ports/linux/termios2.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#define TERMIOS2_H
33

44
#define termios asmtermios /*avoid conflicts with others including termios.h*/
5+
/* for musl def TCGETS2 in asm-generic/ioctls.h */
6+
/* needs (int)sizeof(t) in _IOWR */
7+
/* asm-generic/ioctl.h */
8+
/* libc int ioctl (int, unsigned long int, ...) */
9+
/* musl int ioctl (int, int, ...) */
10+
#include <asm/ioctls.h>
511
#include <asm/termbits.h>
612
#undef termios
713

0 commit comments

Comments
 (0)