URL: https://github.com/SSSD/sssd/pull/90
Author: lslebodn
 Title: #90: UTIL: Fix implicit declaration of function 'htobe32'
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/90/head:pr90
git checkout pr90
From 73f23558a7a843b781d7a070b9ecef9dc61e6ce2 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lukas.slebod...@intrak.sk>
Date: Fri, 18 Nov 2016 17:29:44 +0100
Subject: [PATCH] UTIL: Fix implicit declaration of function 'htobe32'

Include internal wrapper header file for endian related functions.
The "util/sss_endian.h" include available header file on different
platform or it provides compatible macros in the worst case.

Breakage noticed when building SSSD on FreeBSD

  CC       src/util/cert/nss/libsss_cert_la-cert.lo
src/util/cert/nss/cert.c: In function 'cert_to_ssh_key':
src/util/cert/nss/cert.c:358: error: implicit declaration of function 'htobe32'
gmake[2]: *** [Makefile:12421: src/util/cert/nss/libsss_cert_la-cert.lo] Error 1
gmake[2]: Leaving directory '/root/sssd_from_git'
gmake[1]: *** [Makefile:20050: all-recursive] Error 1
gmake[1]: Leaving directory '/root/sssd_from_git'
gmake: *** [Makefile:7116: all] Error 2
---
 src/util/cert/libcrypto/cert.c | 1 +
 src/util/cert/nss/cert.c       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/util/cert/libcrypto/cert.c b/src/util/cert/libcrypto/cert.c
index aba598d..c54db86 100644
--- a/src/util/cert/libcrypto/cert.c
+++ b/src/util/cert/libcrypto/cert.c
@@ -22,6 +22,7 @@
 #include <openssl/pem.h>
 
 #include "util/util.h"
+#include "util/sss_endian.h"
 
 errno_t sss_cert_der_to_pem(TALLOC_CTX *mem_ctx, const uint8_t *der_blob,
                             size_t der_size, char **pem, size_t *pem_size)
diff --git a/src/util/cert/nss/cert.c b/src/util/cert/nss/cert.c
index b5e0ff9..9d31cfe 100644
--- a/src/util/cert/nss/cert.c
+++ b/src/util/cert/nss/cert.c
@@ -31,6 +31,7 @@
 #include "util/crypto/sss_crypto.h"
 #include "util/crypto/nss/nss_util.h"
 #include "util/cert.h"
+#include "util/sss_endian.h"
 
 #define NS_CERT_HEADER "-----BEGIN CERTIFICATE-----"
 #define NS_CERT_TRAILER "-----END CERTIFICATE-----"
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to