Merge pull request #60257 from thefloweringash/socat-darwin

socat: fix darwin build
This commit is contained in:
Michael Raskin 2019-04-27 06:34:53 +00:00 committed by GitHub
commit d7d8743e20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "0jnhjijyq74g3wa4ph0am83z6vq7qna7ac0xqjma8s4197z3zmhd";
};
patches = stdenv.lib.optional stdenv.isDarwin ./speed-type-fix.patch;
postPatch = ''
patchShebangs test.sh
substituteInPlace test.sh \

View file

@ -0,0 +1,13 @@
diff --git a/xio-termios.h b/xio-termios.h
index a288a2f..9858aab 100644
--- a/xio-termios.h
+++ b/xio-termios.h
@@ -148,7 +148,7 @@ extern int xiotermiosflag_applyopt(int fd, struct opt *opt);
extern int xiotermios_value(int fd, int word, tcflag_t mask, tcflag_t value);
extern int xiotermios_char(int fd, int n, unsigned char c);
#ifdef HAVE_TERMIOS_ISPEED
-extern int xiotermios_speed(int fd, int n, unsigned int speed);
+extern int xiotermios_speed(int fd, int n, speed_t speed);
#endif
extern int xiotermios_spec(int fd, int optcode);
extern int xiotermios_flush(int fd);