$OpenBSD: patch-src_lua_lua_c,v 1.1 2004/12/16 13:04:07 pedro Exp $
--- src/lua/lua.c.orig	Thu Apr  3 10:34:42 2003
+++ src/lua/lua.c	Sun Sep  5 21:04:22 2004
@@ -385,9 +385,16 @@ static void openstdlibs (lua_State *l) {
   }
 }
 
+#ifndef LUA_SYSCONF
+#define LUA_SYSCONF	"@initconf@"
+#endif
 
 static int handle_luainit (void) {
   const char *init = getenv("LUA_INIT");
+  /* load system-wide configuration file */
+  if (file_input(LUA_SYSCONF))
+  	l_message(progname, "warning: couldn't load system-wide "
+	    "configuration file");
   if (init == NULL) return 0;  /* status OK */
   else if (init[0] == '@')
     return file_input(init+1);
