Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix compiling with Haiku#4140

Closed
kainjow wants to merge 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
kainjow:patch-1Copy head branch name to clipboard
Closed

Fix compiling with Haiku#4140
kainjow wants to merge 1 commit intolibgit2:masterlibgit2/libgit2:masterfrom
kainjow:patch-1Copy head branch name to clipboard

Conversation

@kainjow
Copy link
Contributor

@kainjow kainjow commented Feb 25, 2017

No description provided.

@pks-t
Copy link
Member

pks-t commented Feb 27, 2017

I'd like to not include platform-specific logic whenever possible. This could be implemented as follows:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bfd1b499..f31bdb28b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,7 +464,9 @@ IF (MSVC)
    # Precompiled headers
 
 ELSE ()
-	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall -Wextra ${CMAKE_C_FLAGS}")
+	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall ${CMAKE_C_FLAGS}")
+
+	ADD_C_FLAG_IF_SUPPORTED(-Wextra)
 
 	IF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
 		SET(CMAKE_C_FLAGS "-std=c99 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS ${CMAKE_C_FLAGS}")

@kainjow
Copy link
Contributor Author

kainjow commented Feb 27, 2017

yeah that would be a better fix. I'll try it out and report back.

@kainjow
Copy link
Contributor Author

kainjow commented Mar 1, 2017

That change works 👍

@pks-t
Copy link
Member

pks-t commented Mar 1, 2017

Want to change your PR accordingly or shall I just merge my own commit?

@kainjow
Copy link
Contributor Author

kainjow commented Mar 1, 2017

You can do your own.

@pks-t
Copy link
Member

pks-t commented Mar 1, 2017

Fixed via #4148

@pks-t pks-t closed this Mar 1, 2017
@pks-t
Copy link
Member

pks-t commented Mar 1, 2017

By the way, thanks for reporting and the initial fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.