common.c: Use _LINUX_CAPABILITY_VERSION_3 in cap_header
[collectd.git] / src / daemon / common.c
index 05b1199..477d759 100644 (file)
 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
@@ -1124,7 +1129,7 @@ int parse_value (const char *value_orig, value_t *ret_value, int ds_type)
   }
 
   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;
@@ -1693,7 +1698,7 @@ int check_capability (int capability) /* {{{ */
        }
 
        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");