URL: https://github.com/SSSD/sssd/pull/92
Author: lslebodn
 Title: #92: UTIL: Fix compilation of sss_utf8 with libunistring
Action: opened

PR body:
"""
The internal header file "util/util.h" was removed from sss_utf8.h
as part of commit de5fa34860886ad68fba5e739987e16c342e8f14.
It was neccessary to ensure libipa_hbac can be build with C90
compatible compiler.

This header file includes many system header file and after
this change caused missing declaration of the function free()

src/util/sss_utf8.c: In function ‘sss_utf8_free’:
src/util/sss_utf8.c:40:12: error: implicit declaration of function ‘free’
  [-Werror=implicit-function-declaration]
     return free(ptr);
            ^~~~
src/util/sss_utf8.c:40:12: warning: incompatible implicit declaration
                                    of built-in function ‘free’
src/util/sss_utf8.c:40:12: note: include ‘<stdlib.h>’ or provide
                                 a declaration of ‘free’
cc1: some warnings being treated as errors
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/92/head:pr92
git checkout pr92
From 438ba2ede8378abe8eff125b53cd8315f54927e9 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lukas.slebod...@intrak.sk>
Date: Fri, 18 Nov 2016 17:49:35 +0100
Subject: [PATCH] UTIL: Fix compilation of sss_utf8 with libunistring
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The internal header file "util/util.h" was removed from sss_utf8.h
as part of commit de5fa34860886ad68fba5e739987e16c342e8f14.
It was neccessary to ensure libipa_hbac can be build with C90
compatible compiler.

This header file includes many system header file and after
this change caused missing declaration of the function free()

src/util/sss_utf8.c: In function ‘sss_utf8_free’:
src/util/sss_utf8.c:40:12: error: implicit declaration of function ‘free’
  [-Werror=implicit-function-declaration]
     return free(ptr);
            ^~~~
src/util/sss_utf8.c:40:12: warning: incompatible implicit declaration
                                    of built-in function ‘free’
src/util/sss_utf8.c:40:12: note: include ‘<stdlib.h>’ or provide
                                 a declaration of ‘free’
cc1: some warnings being treated as errors
---
 src/util/sss_utf8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/sss_utf8.c b/src/util/sss_utf8.c
index 722f28d..e62e9c6 100644
--- a/src/util/sss_utf8.c
+++ b/src/util/sss_utf8.c
@@ -26,6 +26,7 @@
 #include <errno.h>
 
 #ifdef HAVE_LIBUNISTRING
+#include <stdlib.h>
 #include <unistr.h>
 #include <unicase.h>
 #elif defined(HAVE_GLIB2)
_______________________________________________
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