public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Ulf Hermann <ulf.hermann@qt.io>
To: <elfutils-devel@sourceware.org>
Subject: [PATCH] Define uid_t and gid_t in system-elf-libelf-test.c if necessary
Date: Thu, 04 May 2017 16:56:00 -0000	[thread overview]
Message-ID: <6d5d05de-a747-2aa7-d23d-98f485cb4d80@qt.io> (raw)

elf.h does include features.h which should define those. However, on
windows there is no features.h. We have the empty features.h in libgnu
that depends on config.h being included before (which we can't), and the
features.h in lib that is only available when installed in selfcontained
mode. Therefore we need a workaround here.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
 tests/ChangeLog                | 4 ++++
 tests/system-elf-libelf-test.c | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 1a77c02..678a882 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -11,6 +11,10 @@
 
 2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
 
+	* system-elf-libelf-test.c: Define uid_t and gid_t on windows.
+
+2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
+
 	* elfstrmerge.c: Use 07777 instead of ALLPERMS.
 
 2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
diff --git a/tests/system-elf-libelf-test.c b/tests/system-elf-libelf-test.c
index 7dfe498..d9b9cd5 100644
--- a/tests/system-elf-libelf-test.c
+++ b/tests/system-elf-libelf-test.c
@@ -16,6 +16,11 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#define uid_t int
+#define gid_t int
+#endif
+
 #include <elf.h>
 #include <stddef.h>
 #include "../libelf/libelf.h"
-- 
2.1.4

                 reply	other threads:[~2017-05-04 16:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6d5d05de-a747-2aa7-d23d-98f485cb4d80@qt.io \
    --to=ulf.hermann@qt.io \
    --cc=elfutils-devel@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).