$OpenBSD: patch-src_lfs_c,v 1.1 2005/07/08 17:57:27 jolan Exp $
--- src/lfs.c.orig	Fri May 20 13:32:19 2005
+++ src/lfs.c	Thu Jul  7 23:29:53 2005
@@ -28,14 +28,13 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <fcntl.h>
-#include <sys/types.h>
+#include <sys/param.h>
 #include <utime.h>
 #endif
 
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
-#include "compat-5.1.h"
 
 #include "lfs.h"
 
@@ -84,8 +83,8 @@ static int change_dir (lua_State *L) {
 **  and a string describing the error
 */
 static int get_dir (lua_State *L) {
-	char path[255+2];
-	if (getcwd(path, 255) == NULL) {
+	char path[MAXPATHLEN];
+	if (getcwd(path, sizeof(path)) == NULL) {
 		lua_pushnil(L);
 		lua_pushstring(L, getcwd_error);
 		return 2;
