POSIX defines getopt to be declared in unistd.h, and HP-UX (as of
version 11.31) does not appear to have getopt.h. In test programs
which currently include getopt.h and aren't currently built on
Windows, include unistd.h or just assume we will get it via k5-int.h.
(cherry picked from commit
613c62d689c31a325d51be88657dedd17af3cf81)
ticket: 7894
version_fixed: 1.12.2
status: resolved
#include <k5-int.h>
#include "int-proto.h"
-#include <getopt.h>
static void
bail_on_err(krb5_context context, const char *msg, krb5_error_code code)
*/
#include "k5-int.h"
-#include <getopt.h>
static void
bail_on_err(krb5_context context, const char *msg, krb5_error_code code)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <getopt.h>
#include "k5-int.h"
#include "common.h"
*/
#include <sys/types.h>
-#include <getopt.h>
+#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <krb5.h>