diff --git a/src/daemon/common.c b/src/daemon/common.c
index e05da5ceab15bff5c867321013aa2c08cbdd1ac3..02df0968acb3aa03d84b26702d662fdb8ad36c1d 100644 (file)
--- a/src/daemon/common.c
+++ b/src/daemon/common.c
extern kstat_ctl_t *kc;
#endif
+/* AIX doesn't have MSG_DONTWAIT */
+#ifndef MSG_DONTWAIT
+# define MSG_DONTWAIT MSG_NONBLOCK
+#endif
+
#if !HAVE_GETPWNAM_R
static pthread_mutex_t getpwnam_r_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
}
if (value == endptr) {
- ERROR ("parse_value: Failed to parse string as %s: %s.",
+ ERROR ("parse_value: Failed to parse string as %s: \"%s\".",
DS_TYPE_TO_STRING (ds_type), value);
sfree (value);
return -1;
int status;
int socktype;
- socklen_t socklen = sizeof (socklen_t);
- int so_keepalive = 1;
-
- status = getsockopt (sockfd, SOL_SOCKET, SO_TYPE, &socktype, &socklen);
+ status = getsockopt (sockfd, SOL_SOCKET, SO_TYPE,
+ &socktype, &(socklen_t) { sizeof (socktype) });
if (status != 0)
{
WARNING ("set_sock_opts: failed to determine socket type");
if (socktype == SOCK_STREAM)
{
status = setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
- &so_keepalive, sizeof (so_keepalive));
+ &(int) {1}, sizeof (int));
if (status != 0)
WARNING ("set_sock_opts: failed to set socket keepalive flag");
}
cap_header->pid = getpid();
- cap_header->version = _LINUX_CAPABILITY_VERSION;
+ cap_header->version = _LINUX_CAPABILITY_VERSION_3;
if (capget(cap_header, cap_data) < 0)
{
ERROR("check_capability: capget failed");