Skip to content

Commit

Permalink
Make linux-build POSIX compatible
Browse files Browse the repository at this point in the history
Also allow it to actually compile on musl-libc systems.

From glibc's termio.h:
/* Compatible <termio.h> for old `struct termio' ioctl interface.
   This is obsolete; use the POSIX.1 `struct termios' interface
   defined in <termios.h> instead.  */
  • Loading branch information
Moritz Kick committed Jun 29, 2016
1 parent 67a8d97 commit 69122fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
#include <limits.h>

#ifdef LINUX
#include <termio.h>
#include <termios.h>
#include <sys/ioctl.h>
#endif

#ifdef DARWIN
Expand Down
4 changes: 2 additions & 2 deletions src/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,12 +2334,12 @@ void drupal7_encode (u8 digest[64], u8 buf[43])
*/

#ifdef LINUX
static struct termio savemodes;
static struct termios savemodes;
static int havemodes = 0;

int tty_break()
{
struct termio modmodes;
struct termios modmodes;

if (ioctl (fileno (stdin), TCGETA, &savemodes) < 0) return -1;

Expand Down

0 comments on commit 69122fb

Please sign in to comment.