-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
#include <assert.h>
#include <stdbool.h>
devstr = talloc_strndup(res, devpath, pos - devpath);
path = talloc_strdup(res, pos + 1);
- pb_log("%s: resource depends on device %s\n", __func__, devstr);
+ pb_log_fn("resource depends on device %s\n", devstr);
/* defer resolution until we can find a suitable matching device */
info = talloc(res, struct devpath_resource_info);
struct resource *res;
res = talloc(opt, struct resource);
+ talloc_steal(res, url);
res->url = url;
res->resolved = true;