From dda49fbd08e357eec4157890b6e7d9c1519c1ba4 Mon Sep 17 00:00:00 2001 From: Zeex Date: Fri, 29 Aug 2014 23:19:22 +0700 Subject: [PATCH] Fix Linux build error --- source/compiler/CMakeLists.txt | 3 +++ source/compiler/pawndisasm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/compiler/CMakeLists.txt b/source/compiler/CMakeLists.txt index 6190181..2a87595 100644 --- a/source/compiler/CMakeLists.txt +++ b/source/compiler/CMakeLists.txt @@ -79,3 +79,6 @@ TARGET_LINK_LIBRARIES(pawncc pawnc) # The Pawn disassembler SET(PAWNDISASM_SRCS pawndisasm.c ../amx/amxdbg.c ../amx/amx.c) ADD_EXECUTABLE(pawndisasm ${PAWNDISASM_SRCS}) +IF(UNIX) + TARGET_LINK_LIBRARIES(pawndisasm dl) +ENDIF(UNIX) diff --git a/source/compiler/pawndisasm.c b/source/compiler/pawndisasm.c index 1c02772..2447a76 100644 --- a/source/compiler/pawndisasm.c +++ b/source/compiler/pawndisasm.c @@ -484,7 +484,7 @@ static void addchars(char *str,cell value,int pos) int main(int argc,char *argv[]) { - char name[_MAX_PATH]; + char name[FILENAME_MAX]; FILE *fplist; int codesize,count; cell *code,*cip;