diff --git a/source/amx/amxaux.c b/source/amx/amxaux.c index 437e0ee..3ff77e9 100644 --- a/source/amx/amxaux.c +++ b/source/amx/amxaux.c @@ -34,7 +34,7 @@ size_t AMXAPI aux_ProgramSize(char *filename) if ((fp=fopen(filename,"rb")) == NULL) return 0; - fread(&hdr, sizeof hdr, 1, fp); + (void)fread(&hdr, sizeof hdr, 1, fp); fclose(fp); amx_Align16(&hdr.magic); @@ -51,7 +51,7 @@ int AMXAPI aux_LoadProgram(AMX *amx, char *filename, void *memblock) /* open the file, read and check the header */ if ((fp = fopen(filename, "rb")) == NULL) return AMX_ERR_NOTFOUND; - fread(&hdr, sizeof hdr, 1, fp); + (void)fread(&hdr, sizeof hdr, 1, fp); amx_Align16(&hdr.magic); amx_Align32((uint32_t *)&hdr.size); amx_Align32((uint32_t *)&hdr.stp); @@ -73,7 +73,7 @@ int AMXAPI aux_LoadProgram(AMX *amx, char *filename, void *memblock) /* read in the file */ rewind(fp); - fread(memblock, 1, (size_t)hdr.size, fp); + (void)fread(memblock, 1, (size_t)hdr.size, fp); fclose(fp); /* initialize the abstract machine */ diff --git a/source/compiler/CMakeLists.txt b/source/compiler/CMakeLists.txt index f7c5c56..b7d8b5e 100644 --- a/source/compiler/CMakeLists.txt +++ b/source/compiler/CMakeLists.txt @@ -171,8 +171,20 @@ set(PAWNRUNS_SRCS ../amx/amxaux.c ../amx/amxaux.h ../amx/amxcons.c - ../amx/amxcore.c) + ../amx/amxcore.c +) +if(UNIX) + set(PAWNRUN_SRCS + ${PAWNRUN_SRCS} + ../linux/getch.c + ../linux/getch.h + ../linux/binreloc.c + ) +endif() add_executable(pawnruns ${PAWNRUNS_SRCS}) +if(UNIX) + target_link_libraries(pawnruns dl) +endif() add_subdirectory(tests) # Generate a binary package with CPack