[hackers] [st] applied Jukka's BSD patch

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Thu Mar 15 16:39:49 2007

changeset: 67:2dc1195a32b1
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Thu Mar 15 16:36:05 2007 +0100
summary: applied Jukka's BSD patch

diff -r 31c260fe352d -r 2dc1195a32b1 util.c
--- a/util.c Tue Mar 13 13:35:14 2007 +0100
+++ b/util.c Thu Mar 15 16:36:05 2007 +0100
@@ -2,6 +2,7 @@
  * See LICENSE file for license details.
  */
 #include "st.h"
+#include <fcntl.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -43,3 +44,14 @@ estrdup(const char *str) {
                 eprint("fatal: could not malloc() %u bytes\n", strlen(str));
         return res;
 }
+
+#ifndef __GLIBC__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
+int
+getpt(void) {
+ return posix_openpt(O_RDWR|O_NOCTTY);
+}
+#else
+#error Don't know how to open pt...
+#endif /* __NetBSD__ || __FreeBSD__ */
+#endif /* __GLIBC__ */
Received on Thu Mar 15 2007 - 16:39:49 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:18 UTC