Skip to content

Commit

Permalink
s4:lib: Use #ifdef instead of #if for config.h definitions
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
  • Loading branch information
cryptomilk authored and GaryWL committed Nov 28, 2018
1 parent 3872d4a commit 788d9f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source4/lib/socket/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ _PUBLIC_ const struct socket_ops *socket_getops_byname(const char *family, enum
return socket_ipv4_ops(type);
}

#if HAVE_IPV6
#ifdef HAVE_IPV6
if (strcmp("ipv6", family) == 0) {
return socket_ipv6_ops(type);
}
Expand Down
2 changes: 1 addition & 1 deletion source4/lib/socket/socket_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ _PUBLIC_ const struct socket_ops *socket_ipv4_ops(enum socket_type type)
return &ipv4_ops;
}

#if HAVE_IPV6
#ifdef HAVE_IPV6

static struct in6_addr interpret_addr6(const char *name)
{
Expand Down
4 changes: 2 additions & 2 deletions source4/lib/tls/tlscert.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void tls_cert_generate(TALLOC_CTX *mem_ctx,
TLSCHECK(gnutls_x509_crt_set_key_usage(cacrt, GNUTLS_KEY_KEY_CERT_SIGN | GNUTLS_KEY_CRL_SIGN));
TLSCHECK(gnutls_x509_crt_set_version(cacrt, 3));
TLSCHECK(gnutls_x509_crt_get_key_id(cacrt, 0, keyid, &keyidsize));
#if HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID
#ifdef HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID
TLSCHECK(gnutls_x509_crt_set_subject_key_id(cacrt, keyid, keyidsize));
#endif
TLSCHECK(gnutls_x509_crt_sign2(cacrt, cacrt, cakey,
Expand All @@ -130,7 +130,7 @@ void tls_cert_generate(TALLOC_CTX *mem_ctx,
#endif
TLSCHECK(gnutls_x509_crt_set_version(crt, 3));
TLSCHECK(gnutls_x509_crt_get_key_id(crt, 0, keyid, &keyidsize));
#if HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID
#ifdef HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID
TLSCHECK(gnutls_x509_crt_set_subject_key_id(crt, keyid, keyidsize));
#endif
TLSCHECK(gnutls_x509_crt_sign2(crt, crt, key,
Expand Down

0 comments on commit 788d9f3

Please sign in to comment.