From 3c9f88330b61f861cb1218e3b16167c7013524c5 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Mon, 3 Jun 2013 14:15:46 +0200 Subject: [PATCH 1/2] link to libmath when checking for LUA_COMPAT --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c95a496..5c31c07 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,7 @@ fi _LIBS="${LIBS}" _CFLAGS="${CFLAGS}" _CPPFLAGS="${CPPFLAGS}" -LIBS="${LIBS} ${LUA_LIBS}" +LIBS="-lm ${LIBS} ${LUA_LIBS}" CFLAGS="${CFLAGS} ${LUA_CFLAGS}" CPPFLAGS="${CPPFLAGS} ${LUA_CFLAGS}" From 367d5e940a85d18a40421f0e7dbf2f989b6d4f1f Mon Sep 17 00:00:00 2001 From: flygoast Date: Fri, 7 Jun 2013 00:23:50 +0800 Subject: [PATCH 2/2] bugfix: fix the buffer size of pipemsg --- lsyncd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsyncd.c b/lsyncd.c index 0e230c7..b70e384 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -1246,7 +1246,7 @@ l_exec( lua_State *L ) struct pipemsg *pm; logstring( "Exec", "adding pipe observance" ); pm = s_calloc( 1, sizeof( struct pipemsg ) ); - pm->text = s_calloc( pipe_len + 1, sizeof( char * ) ); + pm->text = s_calloc( pipe_len + 1, sizeof( char ) ); memcpy( pm->text, pipe_text, pipe_len + 1 ); pm->tlen = pipe_len; pm->pos = len;