Skip to content

Commit

Permalink
tree-wide: use instead of #ifdef for HAVE_*
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwata authored and poettering committed Jun 29, 2018
1 parent cc7d50a commit 545cdb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/firstboot/firstboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <getopt.h>
#include <unistd.h>

#ifdef HAVE_CRYPT_H
#if HAVE_CRYPT_H
/* libxcrypt is a replacement for glibc's libcrypt, and libcrypt might be
* removed from glibc at some point. As part of the removal, defines for
* crypt(3) are dropped from unistd.h, and we must include crypt.h instead.
Expand Down
2 changes: 1 addition & 1 deletion src/resolve/resolved-dnssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const char* const dnssd_service_dirs[] = {
"/etc/systemd/dnssd",
"/run/systemd/dnssd",
"/usr/lib/systemd/dnssd",
#ifdef HAVE_SPLIT_USR
#if HAVE_SPLIT_USR
"/lib/systemd/dnssd",
#endif
NULL
Expand Down
8 changes: 4 additions & 4 deletions src/tmpfiles/tmpfiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ static int fd_set_acls(Item *item, int fd, const struct stat *st) {

static int path_set_acls(Item *item, const char *path) {
int r = 0;
#ifdef HAVE_ACL
#if HAVE_ACL
_cleanup_close_ int fd = -1;
struct stat st;

Expand All @@ -1067,9 +1067,9 @@ static int path_set_acls(Item *item, const char *path) {
return log_error_errno(errno, "Failed to fstat() file %s: %m", path);

r = fd_set_acls(item, fd, &st);
#endif
return r;
}
#endif
return r;
}

#define ATTRIBUTES_ALL \
(FS_NOATIME_FL | \
Expand Down

0 comments on commit 545cdb9

Please sign in to comment.