[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.2.0 compile error
- From: "Bryce Simonds" <bsimonds@...>
- Date: Fri, 23 Dec 2011 13:27:32 -0600
Greetings,
On FreeBSD 7.4 I ran into a compile error while compiling Lua 5.2.0 from the
source code:
[bsimonds@carbon ~/src/lua-5.2.0]$ make freebsd
...
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c liolib.c
liolib.c: In function 'f_seek':
liolib.c:543: error: 'off_t' undeclared (first use in this function)
liolib.c:543: error: (Each undeclared identifier is reported only once
liolib.c:543: error: for each function it appears in.)
liolib.c:543: error: expected ';' before 'offset'
liolib.c:544: error: 'offset' undeclared (first use in this function)
A quick search through the archives did not reveal to me if this bug has
been reported before or not.
I was able to easily solve this by placing an include to unistd.h in the
liolib.c file. A short unified diff of the change follows:
--- liolib.c 2011-11-25 12:50:03.000000000 +0000
+++ liolib.c.new 2011-12-23 14:00:30.000000000 +0000
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#define liolib_c
#define LUA_LIB
Thank you,
Bryce Simonds
Veriam Technologies, Inc.