From 8cae9876f3e8156c6e04999b25c3439d3e62f170 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 17 Feb 2015 06:21:06 -0700 Subject: [PATCH] Include unistd.h in siglist.c and signame.c to get gid_t which is used by sudo_compat.h. Bug #686 --- lib/util/mksiglist.c | 5 ++++- lib/util/mksigname.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/util/mksiglist.c b/lib/util/mksiglist.c index 432f30b43..710ff92be 100644 --- a/lib/util/mksiglist.c +++ b/lib/util/mksiglist.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Todd C. Miller + * Copyright (c) 2010-2012, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -44,6 +44,9 @@ main(int argc, char *argv[]) printf("#include \n"); printf("#include \n"); + printf("#ifdef HAVE_UNISTD_H\n"); + printf("# include \n"); + printf("#endif /* HAVE_UNISTD_H */\n"); printf("#include \"sudo_compat.h\"\n\n"); printf("const char *const sudo_sys_siglist[NSIG] = {\n"); for (i = 0; i < NSIG; i++) { diff --git a/lib/util/mksigname.c b/lib/util/mksigname.c index 4502ffdcb..3d0d9c14b 100644 --- a/lib/util/mksigname.c +++ b/lib/util/mksigname.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Todd C. Miller + * Copyright (c) 2010-2012, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -44,6 +44,9 @@ main(int argc, char *argv[]) printf("#include \n"); printf("#include \n"); + printf("#ifdef HAVE_UNISTD_H\n"); + printf("# include \n"); + printf("#endif /* HAVE_UNISTD_H */\n"); printf("#include \"sudo_compat.h\"\n\n"); printf("const char *const sudo_sys_signame[NSIG] = {\n"); for (i = 0; i < NSIG; i++) { -- 2.40.0