Skip to content

Commit

Permalink
Undefined symbol make_unix_socket
Browse files Browse the repository at this point in the history
syslog_direct_create defined in (lib/syslog-direct.c) uses make_unix_socket
which is currently undefined on the windows build.

We either can remove the new file from the chain but this patch proposes
to define a wrapper to make_unix_socket in which we return EINVAL.

This will avoid this kind of problems in the future.

Signed-off-by: Alin Gabriel Serdean <[email protected]>
Acked-by: Eitan Eliahu <[email protected]>
Signed-off-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
Alin Serdean authored and shettyg committed Jul 11, 2015
1 parent 943f394 commit a35f3d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/socket-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ int af_inet_ifreq_ioctl(const char *name, struct ifreq *,
#endif

#ifdef _WIN32
static inline int make_unix_socket(int style, bool nonblock,
const char *bind_path,
const char *connect_path)
{
return -EINVAL;
}

/* Windows defines the 'optval' argument as char * instead of void *. */
#define setsockopt(sock, level, optname, optval, optlen) \
rpl_setsockopt(sock, level, optname, optval, optlen)
Expand Down

0 comments on commit a35f3d6

Please sign in to comment.