Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for build on fedora 26 with gcc 7.0.1 #179

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ endif()
set (DEPS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../deps")
include_directories(${DEPS_SOURCE_DIR})

set (LUAJIT_INCLUDE_DIR ${DEPS_SOURCE_DIR}/LuaJIT-2.0.3/src)
set (LUAJIT_LIBRARIES ${DEPS_SOURCE_DIR}/LuaJIT-2.0.3/src/libluajit.a)
pkg_check_modules (LUAJIT luajit lua REQUIRED)

#set (ImageMagick_INCLUDE_DIRS "/Users/zippo/develop/linuxc/imagemagick-src")
#set (ImageMagick_MagickCore_LIBRARY "/Users/zippo/develop/linuxc/imagemagick-src/magick/.libs/libMagickCore-Q16.a")
Expand Down Expand Up @@ -149,7 +148,6 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wno-unused-function -Wno-deprecat
message("Build Type: ${CMAKE_BUILD_TYPE}")
message("Std CFLAGS: ${CMAKE_C_FLAGS}")

link_directories("/usr/lib" "/usr/local/lib")
add_executable(zimg ${SOURCES})
target_link_libraries(zimg ${ZIMG_EXTERNAL_LIBS})

4 changes: 2 additions & 2 deletions src/CMakeModules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ if (CMAKE_COMPILER_IS_GNUCC)
if(APPLE)
# Newer versions of OSX will spew a bunch of warnings about deprecated ssl functions,
# this should be addressed at some point in time, but for now, just ignore them.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -Wno-deprecated-declarations")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -Wno-deprecated-declarations")
elseif(UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112")
endif(APPLE)

endif(CMAKE_COMPILER_IS_GNUCC)
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char **argv);

evbase_t *evbase;

extern const struct luaL_reg zimg_lib[];
extern const struct luaL_Reg zimg_lib[];
extern const struct luaL_Reg loglib[];

const char *conf_file = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/zlscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int zimg_ret(lua_State *L)
return 0;
}

const struct luaL_reg zimg_lib[] = {
const struct luaL_Reg zimg_lib[] = {
//{"__gc", destroy_wi_image },
{"cols", get_wi_cols },
{"rows", get_wi_rows },
Expand Down