Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565202 - Support GNU/Hurd: test macros
Summary: Support GNU/Hurd: test macros
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 09:21 UTC by Benda Xu
Modified: 2015-11-19 02:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
GNU-Hurd_declaration_test.patch (0150-GNU-Hurd_declaration_test.patch,2.33 KB, patch)
2015-11-09 10:09 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2015-11-09 09:21:28 UTC
commit 3f82edbeb9251149c6aff071d6537379af4e5eea
Author: Svante Signell <svante.signell@gmail.com>
Date:   Tue Oct 21 01:53:37 2014 -0500

    Fix GNU/kFreeBSD port

    Check for __FreeBSD_kernel instead of __GLIBC__ in source files.

    note from William Hubbs:
    I was told this is a better check for GNU/kFreeBSD than checking the
    C  library the source is being compiled against.
    GNU/kFreeBSD than checking which library we are using.

diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 04f25b1..9970315 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -30,7 +30,7 @@

 #include "librc.h"

-#if defined(__linux__) || defined (__GLIBC__)
+#if defined(__linux__) || defined (__FreeBSD_kernel__)
 static bool
 pid_is_exec(pid_t pid, const char *exec)
 {
.....

Breaks GNU/Hurd builds.  Previously defined (__GLIBC__) matches GNU/Hurd.

The patch attached will test against __GNU__ explicitly and also unify the formats.

Reproducible: Always
Comment 1 Benda Xu gentoo-dev 2015-11-09 10:09:29 UTC
Created attachment 416350 [details, diff]
GNU-Hurd_declaration_test.patch
Comment 2 William Hubbs gentoo-dev 2015-11-11 19:55:47 UTC
This is applied in commit 085d77f.
This will be in OpenRC-0.19.
Comment 3 Benda Xu gentoo-dev 2015-11-19 02:35:23 UTC
Thanks, William.