summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-05-04 18:07:53 +0200
committerUlf Hermann <[email protected]>2017-05-08 12:17:05 +0000
commit212c385b0274e42e15011d7c8431f570a399c25b (patch)
tree00ffd8634a2699a2897e2227bb4cc99cc1b3b973 /tests
parent848044155a3f227f13ccb4830efcf32f6773ece9 (diff)
Define uid_t and gid_t in system-elf-libelf-test.c if necessary
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. Change-Id: Ib9074d485ab56e53eb671b859e085b934a782b55 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/system-elf-libelf-test.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 1a77c026..678a882d 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -11,6 +11,10 @@
2017-05-04 Ulf Hermann <[email protected]>
+ * system-elf-libelf-test.c: Define uid_t and gid_t on windows.
+
+2017-05-04 Ulf Hermann <[email protected]>
+
* elfstrmerge.c: Use 07777 instead of ALLPERMS.
2017-05-04 Ulf Hermann <[email protected]>
diff --git a/tests/system-elf-libelf-test.c b/tests/system-elf-libelf-test.c
index 7dfe4989..d9b9cd5a 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"