From ca5ede929cd286ccc31742468787ed2f43927548 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 11 Aug 2015 17:13:15 +0000
Subject: gcc2 patch


diff --git a/src/Makefile b/src/Makefile
index 5f25dd1..d030639 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,8 +6,8 @@
 # Your platform. See PLATS for possible values.
 PLAT= guess
 
-CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CC= gcc
+CFLAGS= -O2 -Wall -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
 LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
 LIBS= -lm $(SYSLIBS) $(MYLIBS)
 
diff --git a/src/llimits.h b/src/llimits.h
index 48c97f9..419f426 100644
--- a/src/llimits.h
+++ b/src/llimits.h
@@ -154,7 +154,7 @@ typedef LUAI_UACINT l_uacInt;
 */
 #if !defined(likely)
 
-#if defined(__GNUC__)
+#if defined(__GNUC__)  > 3
 #define likely(x)	(__builtin_expect(((x) != 0), 1))
 #define unlikely(x)	(__builtin_expect(((x) != 0), 0))
 #else
-- 
2.28.0

