$OpenBSD$
--- src/plcore.c.orig	Tue May 10 14:39:15 2005
+++ src/plcore.c	Sun Apr 16 02:57:50 2006
@@ -34,6 +34,8 @@
 
 #define DEBUG
 
+#include <sys/param.h>
+
 #define NEED_PLDEBUG
 #include "plcore.h"
 
@@ -1994,7 +1996,7 @@ int plInBuildTree()
   static int inBuildTree = 0;
 
   if (inited == 0) {
-    char currdir[256];
+    char currdir[MAXPATHLEN];
 
 /* AM: getcwd has a somewhat strange status on Windows, its proper
    name is _getcwd, this is a problem in the case of DLLs, like with
@@ -2004,7 +2006,7 @@ int plInBuildTree()
 #define getcwd _getcwd
 #endif
 
-    if (getcwd(currdir, 256) == NULL) {
+    if (getcwd(currdir, sizeof(currdir)) == NULL) {
       pldebug("plInBuildTree():", "Not enough buffer space");
     } else if (strncmp(BUILD_DIR, currdir, strlen(BUILD_DIR)) == 0)
       inBuildTree = 1;
