Skip to content

include correct header for hostent #2853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/ansi-c/library/netdb.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* FUNCTION: gethostbyname */

#ifdef _MSC_VER
#include <windows.h>
#else
#include <netdb.h>
#endif

__CPROVER_bool __VERIFIER_nondet___CPROVER_bool();

Expand All @@ -25,6 +29,12 @@ struct hostent *gethostbyname(const char *name)

/* FUNCTION: gethostbyaddr */

#ifdef _MSC_VER
#include <windows.h>
#else
#include <netdb.h>
#endif

__CPROVER_bool __VERIFIER_nondet___CPROVER_bool();

struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)
Expand All @@ -46,6 +56,9 @@ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)

/* FUNCTION: gethostent */

// There does not appear to be a Windows variant of gethostent
#include <netdb.h>

__CPROVER_bool __VERIFIER_nondet___CPROVER_bool();

struct hostent *gethostent(void)
Expand Down