Browse Source

fix for lua not installed

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1308 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.12
Jan Kneschke 16 years ago
parent
commit
4b8905d4b4
  1. 8
      src/mod_magnet_cache.c
  2. 9
      src/mod_magnet_cache.h

8
src/mod_magnet_cache.c

@ -1,12 +1,14 @@
#include <stdlib.h>
#include <lualib.h>
#include <lauxlib.h>
#include <time.h>
#include <assert.h>
#include "mod_magnet_cache.h"
#include "stat_cache.h"
#ifdef HAVE_LUA_H
#include <lualib.h>
#include <lauxlib.h>
script *script_init() {
script *sc;
@ -131,3 +133,5 @@ lua_State *script_cache_get_script(server *srv, connection *con, script_cache *c
return sc->L;
}
#endif

9
src/mod_magnet_cache.h

@ -1,16 +1,21 @@
#ifndef _MOD_MAGNET_CACHE_H_
#define _MOD_MAGNET_CACHE_H_
#include <lua.h>
#include "buffer.h"
#include "base.h"
#ifdef HAVE_LUA_H
#include <lua.h>
#endif
typedef struct {
buffer *name;
buffer *etag;
#ifdef HAVE_LUA_H
lua_State *L;
#endif
time_t last_used; /* LRU */
} script;

Loading…
Cancel
Save