Package: mpich
Severity: important
Version: 1.2.7-9
Tags: patch
User: glibc-bsd-de...@lists.alioth.debian.org
Usertags: kfreebsd
Hi,
the current version fails to build on GNU/kFreeBSD.
The current code does not use functions exposed by
<termios.h>, but tries to guess implementation of these functions.
Please stick to <termios.h> interface specified by POSIX.
http://www.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
There is also need of -D_GNU_SOURCE in mpid/mpd/ part.
Please find attached patch with those fixes.
It would also be nice if you can ask upstream
to include this changes.
Thanks in advance
Petr
only in patch2:
unchanged:
--- mpich-1.2.7.orig/mpid/ch_p4/p4/lib/p4_secure.c
+++ mpich-1.2.7/mpid/ch_p4/p4/lib/p4_secure.c
@@ -450,7 +450,7 @@
{
struct termios tty_new;
- if (ioctl(0, TIOCGETA, &tty_orig) < 0)
+ if (tcgetattr(0, &tty_orig) < 0)
{
fprintf(stderr, "tcgetattr failed: %s\n", strerror(errno));
return -1;
@@ -460,7 +460,7 @@
tty_new.c_lflag &= ~(ECHO);
- if (ioctl(0, TIOCSETA, &tty_new) < 0)
+ if (tcsetattr(0, TCSANOW, &tty_new) < 0)
{
fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno));
return -1;
@@ -470,7 +470,7 @@
static int echo_on (void)
{
- if (ioctl(0, TIOCSETA, &tty_orig) < 0)
+ if (tcsetattr(0, TCSANOW, &tty_orig) < 0)
{
fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno));
return -1;
only in patch2:
unchanged:
--- mpich-1.2.7.orig/mpid/mpd/Makefile.in
+++ mpich-1.2.7/mpid/mpd/Makefile.in
@@ -16,7 +16,7 @@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
GDB = @GDB@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -D_GNU_SOURCE
C_COMPILE = ${CC} ${INCLUDES} ${CFLAGS} ${COPTIONS}
C_LINK = ${CLINKER} ${CFLAGS} ${COPTIONS} ${LDFLAGS}