Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714680 - sys-libs/tevent : /.../tevent.h: error: unknown type name pid_t
Summary: sys-libs/tevent : /.../tevent.h: error: unknown type name pid_t
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: PATCH
: 821691 (view as bug list)
Depends on:
Blocks: missing-musl-includes
  Show dependency tree
 
Reported: 2020-03-25 08:17 UTC by Toralf Förster
Modified: 2022-07-30 17:35 UTC (History)
5 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.36 KB, text/plain)
2020-03-25 08:17 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,307.93 KB, text/plain)
2020-03-25 08:17 UTC, Toralf Förster
Details
environment (environment,139.59 KB, text/plain)
2020-03-25 08:17 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,21.62 KB, application/x-bzip)
2020-03-25 08:17 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,78.75 KB, application/x-bzip)
2020-03-25 08:17 UTC, Toralf Förster
Details
sys-libs:ldb-2.1.1:20200325-064357.log (sys-libs:ldb-2.1.1:20200325-064357.log,119.29 KB, text/plain)
2020-03-25 08:17 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,40.65 KB, application/x-bzip)
2020-03-25 08:17 UTC, Toralf Förster
Details
sys-libs/tevent: include sys/types.h if pid_t undefined (include-sys_types_h-if-pid_t-undefined.patch,370 bytes, patch)
2020-03-25 23:12 UTC, Fabio Scaccabarozzi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-25 08:17:03 UTC
In file included from ../../include/ldb.h:51,
                 from ../../tests/test_ldb_qsort.c:26:
/usr/include/tevent.h:1440:8: error: unknown type name pid_t
 1440 |        pid_t *pid,
      |        ^~~~~
/usr/include/tevent.h:1519:8: error: unknown type name pid_t

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200316-165821

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.1 *
  [2]   rust-bin-1.42.0

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Wed Mar 25 05:38:36 UTC 2020
/var/db/repos/musl	Sun Mar 22 15:02:57 UTC 2020

emerge -qpvO sys-libs/ldb
[ebuild  N    ] sys-libs/ldb-2.1.1  USE="ldap lmdb -doc -python -test" PYTHON_SINGLE_TARGET="python3_6 -python3_7 -python3_8"
Comment 1 Toralf Förster gentoo-dev 2020-03-25 08:17:06 UTC
Created attachment 625696 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-25 08:17:09 UTC
Created attachment 625698 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-25 08:17:12 UTC
Created attachment 625700 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-25 08:17:15 UTC
Created attachment 625702 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-25 08:17:17 UTC
Created attachment 625704 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-25 08:17:20 UTC
Created attachment 625706 [details]
sys-libs:ldb-2.1.1:20200325-064357.log
Comment 7 Toralf Förster gentoo-dev 2020-03-25 08:17:23 UTC
Created attachment 625708 [details]
temp.tbz2
Comment 8 Fabio Scaccabarozzi 2020-03-25 23:12:09 UTC
Created attachment 625880 [details, diff]
sys-libs/tevent: include sys/types.h if pid_t undefined

tevent.h makes use of pid_t without including it on musl.
Fix tevent (the real issue) instead of fixing ldb.
The attached patch makes sys-libs/ldb compile properly.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-31 19:58:34 UTC
alpine disable a test but not seemingly this one: https://git.alpinelinux.org/aports/tree/main/ldb/disable-compile-error-test.patch
Comment 10 Jory A. Pratt gentoo-dev 2020-05-07 20:50:58 UTC
(In reply to Fabio Scaccabarozzi from comment #8)
> Created attachment 625880 [details, diff] [details, diff]
> sys-libs/tevent: include sys/types.h if pid_t undefined
> 
> tevent.h makes use of pid_t without including it on musl.
> Fix tevent (the real issue) instead of fixing ldb.
> The attached patch makes sys-libs/ldb compile properly.

No need to ifdef, you can just include the header. 

diff --git a/tevent.h b/tevent.h
index 3c3e3cc..011e1ad 100644
--- a/tevent.h
+++ b/tevent.h
@@ -31,6 +31,7 @@
 #include <stdint.h>
 #include <talloc.h>
 #include <sys/time.h>
+#include <sys/types.h>
 #include <stdbool.h>
 
 struct tevent_context;
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-04 17:49:21 UTC
*** Bug 821691 has been marked as a duplicate of this bug. ***
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-04 17:49:36 UTC
Workaround here too: https://bugs.gentoo.org/821691#c4
Comment 13 Ben Kohler gentoo-dev 2022-07-30 17:35:35 UTC
Stable tevent seems to already be including types.h as mentioend in comment #10 here, closing