[Rpm-maint] [rpm-software-management/rpm] Enhance requires with version information from the build root. (PR #2372)
Panu Matilainen
notifications at github.com
Mon Feb 6 13:42:50 UTC 2023
@pmatilai commented on this pull request.
> + if (pipe(pipefd) == -1) {
+ return NULL; // Should this be a fatal error instead?
+ }
+ cpid = fork();
+ if (cpid == -1) {
+ return NULL; // Should this be a fatal error instead?
+ }
+ if (cpid == 0) {
+ void *dl_handle;
+ struct link_map *linkmap;
+ char *version = NULL;
+
+ close(pipefd[0]);
+ dl_handle = dlmopen(LM_ID_NEWLM, filename, RTLD_LAZY);
+ if (dl_handle == NULL) _exit(0);
+ if (dlinfo(dl_handle, RTLD_DI_LINKMAP, &linkmap) != -1) {
Sadly both dlinfo() and dlmopen() are GNU extensions, so these need to be checked for in cmake and this works made conditional on their availability.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2372#pullrequestreview-1285211942
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2372/review/1285211942 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230206/43da9c16/attachment.html>
More information about the Rpm-maint
mailing list