$OpenBSD: patch-lposix_c,v 1.1.1.1 2004/12/16 21:21:14 pedro Exp $
--- lposix.c.orig	Thu Dec 16 16:10:37 2004
+++ lposix.c	Thu Dec 16 16:12:57 2004
@@ -16,7 +16,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/times.h>
-#include <sys/types.h>
+#include <sys/param.h>
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <time.h>
@@ -29,10 +29,6 @@
 #include "lua.h"
 #include "lauxlib.h"
 
-#ifndef MYBUFSIZ
-#define MYBUFSIZ 512
-#endif
-
 #include "modemuncher.c"
 
 static const char *filetype(mode_t m)
@@ -220,7 +216,7 @@ static int Pfiles(lua_State *L)			/** fi
 
 static int Pgetcwd(lua_State *L)		/** getcwd() */
 {
-	char buf[MYBUFSIZ];
+	char buf[MAXPATHLEN];
 	if (getcwd(buf, sizeof(buf)) == NULL)
 		return pusherror(L, ".");
 	else
@@ -277,7 +273,7 @@ static int Psymlink(lua_State *L)		/** s
 
 static int Preadlink(lua_State *L)		/** readlink(path) */
 {
-	char buf[MYBUFSIZ];
+	char buf[MAXPATHLEN];
 	const char *path = luaL_checkstring(L, 1);
 	int n = readlink(path, buf, sizeof(buf));
 	if (n==-1) return pusherror(L, path);
