fix compile error on buildbots
authorNathan S. Evans <evans@in.tum.de>
Thu, 23 Sep 2010 11:29:52 +0000 (11:29 +0000)
committerNathan S. Evans <evans@in.tum.de>
Thu, 23 Sep 2010 11:29:52 +0000 (11:29 +0000)
src/monkey/gdbmi_connect.c
src/monkey/gdbmi_get_free_vt.c

index 501d1f0645f3a8921cb1ee0a9adeb451c53a99de..7fe9c50f8074f47b781bf6e5cf52065eb7161e09 100644 (file)
@@ -17,7 +17,7 @@ in a row.
 
 ***************************************************************************/
 
-#define _GNU_SOURCE
+#include "platform.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -31,7 +31,11 @@ in a row.
 #include <signal.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+
 #include "gdbmi.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
 
 #ifndef TEMP_FAILURE_RETRY
  #define TEMP_FAILURE_RETRY(a) (a)
index ac5c222f0ec6609b0ebaed06bd08228f59c8704a..30e8b355b19531f37f75beac8d198f923fc9fed7 100644 (file)
@@ -136,6 +136,7 @@ release it.
 
 mi_aux_term *gmi_look_for_free_vt()
 {
+ int ret;
  int vt=mi_look_for_free_vt();
  mi_aux_term *res;
 
@@ -145,7 +146,7 @@ mi_aux_term *gmi_look_for_free_vt()
  if (!res)
     return NULL;
  res->pid=-1;
- asprintf(&res->tty,"/dev/tty%d",vt);
ret = asprintf(&res->tty,"/dev/tty%d",vt);
  return res;
 }