qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Friedt <chrisfriedt@gmail.com>
To: famz@redhat.com, mst@redhat.com
Cc: Christopher Friedt <chrisfriedt@gmail.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link
Date: Mon,  2 May 2016 20:47:58 -0400	[thread overview]
Message-ID: <1462236478-61645-3-git-send-email-chrisfriedt@gmail.com> (raw)
In-Reply-To: <1462236478-61645-1-git-send-email-chrisfriedt@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]


The file ivshmem.c unconditionally references event_notifier_init_fd() in util/event_notifier-posix.c, even if CONFIG_EVENTFD is not defined. On platforms where CONFIG_POSIX is defined, but CONFIG_EVENTFD is not defined, that results in an undefined symbol referenced from ivshmem.c and the link fails. That applies to Mac OS X, but possibly other BSD-based distros.

Note: there is nothing specific to eventfd inside and event_notifier_init() also fails unconditionally if CONFIG_EVENTFD is not defined.
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
---
 util/event_notifier-posix.c | 2 --
 1 file changed, 2 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Remove-unnecessary-CONFIG_EVENTFD-preprocessor-condi.patch --]
[-- Type: text/x-patch; name="0002-Remove-unnecessary-CONFIG_EVENTFD-preprocessor-condi.patch", Size: 554 bytes --]

diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index c1f0d79..c9bb34d 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -21,7 +21,6 @@
 #include <sys/eventfd.h>
 #endif
 
-#ifdef CONFIG_EVENTFD
 /*
  * Initialize @e with existing file descriptor @fd.
  * @fd must be a genuine eventfd object, emulation with pipe won't do.
@@ -31,7 +30,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd)
     e->rfd = fd;
     e->wfd = fd;
 }
-#endif
 
 int event_notifier_init(EventNotifier *e, int active)
 {

  parent reply	other threads:[~2016-05-03  0:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03  0:47 [Qemu-devel] [PATCH 0/2] Resolve link errors on Mac OS X Christopher Friedt
2016-05-03  0:47 ` [Qemu-devel] [PATCH 1/2] Use libtool instead of ar to create static libraries on Darwin Christopher Friedt
2016-05-03  0:53   ` Peter Maydell
2016-05-03  1:08     ` Christopher Friedt
2016-05-03  1:04   ` Fam Zheng
2016-05-03  1:08     ` Christopher Friedt
2016-05-06 19:07   ` Michael Tokarev
2016-05-06 22:26     ` Peter Maydell
2016-05-03  0:47 ` Christopher Friedt [this message]
2016-05-03  1:01   ` [Qemu-devel] [PATCH 2/2] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link Peter Maydell
2016-05-03  1:14     ` Christopher Friedt
2016-05-03  1:18       ` Peter Maydell
2016-05-03  1:25         ` Christopher Friedt
2016-05-03  1:27           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462236478-61645-3-git-send-email-chrisfriedt@gmail.com \
    --to=chrisfriedt@gmail.com \
    --cc=famz@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).