Merge lp:~midori/midori/findFileExecInfo into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6994
Merged at revision: 7001
Proposed branch: lp:~midori/midori/findFileExecInfo
Merge into: lp:midori
Diff against target: 33 lines (+5/-11)
1 file modified
CMakeLists.txt (+5/-11)
To merge this branch: bzr merge lp:~midori/midori/findFileExecInfo
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+265222@code.launchpad.net

Commit message

Use find_file to locate execinfo.h

It may not be available in a particular libc.

To post a comment you must log in.
Revision history for this message
Anthony G. Basile <blueness@gentoo.org> (basile-r) wrote :

I just tested this patch on musl/amd64 and it works.

see https://wiki.gentoo.org/wiki/Project:Hardened_musl

Revision history for this message
Paweł Forysiuk (tuxator) wrote :

Looks reasonable.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-06-18 05:03:38 +0000
3+++ CMakeLists.txt 2015-07-19 22:27:33 +0000
4@@ -68,6 +68,11 @@
5 if (SIGNAL)
6 add_definitions("-DHAVE_SIGNAL_H")
7 endif ()
8+
9+ find_file (EXEC_INFO execinfo.h)
10+ if (EXEC_INFO)
11+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_EXECINFO_H)
12+ endif ()
13 endif ()
14
15 find_library (X11 X11)
16@@ -101,17 +106,6 @@
17 add_definitions("-DHAVE_OSX=0")
18 endif ()
19
20-# Check if execinfo.h header exists
21-string(FIND ${CMAKE_SYSTEM_NAME} "BSD" BEGIN)
22-if (${BEGIN} GREATER 0)
23- string(SUBSTRING ${CMAKE_SYSTEM_NAME} ${BEGIN} 3 BSD)
24-else()
25- set(BSD 0)
26-endif()
27-if (UNIX AND NOT BSD AND NOT DFLY)
28- set(VALAFLAGS ${VALAFLAGS} -D HAVE_EXECINFO_H)
29-endif ()
30-
31 find_package(PkgConfig)
32 pkg_check_modules(DEPS REQUIRED
33 libxml-2.0>=2.6

Subscribers

People subscribed via source and target branches

to all changes: