Skip to content

Commit

Permalink
fix(linux): Adds missing header file for musl libc (eg alpine) (#1487)
Browse files Browse the repository at this point in the history
Fixes #1470  After adding the new custom baud rate implementation for Linux, a build breaking bug occurred on Alpine Linux due to musl's handling of the kernel header files involved with ioctls. This patch introduces a fix by using the solution found [here](tio/tio#65) on a similar, serial oriented project.

Tested in an Alpine Linux docker container. Passing all hardware tests.
  • Loading branch information
Fumon authored and reconbot committed Feb 15, 2018
1 parent 792459d commit 02e2bfe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/serialport_linux.cpp
@@ -1,6 +1,7 @@
#if defined(__linux__)

#include <sys/ioctl.h>
#include <asm/ioctls.h>
#include <asm/termbits.h>

// Uses the termios2 interface to set nonstandard baud rates
Expand Down

0 comments on commit 02e2bfe

Please sign in to comment.