$NetBSD$

--- main.c.orig	2003-05-15 21:06:35.000000000 +0000
+++ main.c
@@ -5,6 +5,9 @@
  */
 
 #include "links.h"
+#if HAVE_LUA
+#include <lauxlib.h>
+#endif
 
 int retval = RET_OK;
 
@@ -454,7 +457,7 @@ void terminate_all_subsystems()
 #endif
 #ifdef HAVE_LUA
 	if (init_b && !prepare_lua(NULL)) {
-		lua_dostring(lua_state, "if quit_hook then quit_hook() end");
+		luaL_dostring(lua_state, "if quit_hook then quit_hook() end");
 		finish_lua();
 	}
 #endif
