Blame SOURCES/bind-dyndb-ldap-tkrizek-0001-Revert-BIND-9.11-use-new-public-header-isc-errno.h-i.patch

29882e
From 34efc7e7d27d62f1ce67a4b12f41e3ba6ac5045f Mon Sep 17 00:00:00 2001
29882e
From: Tomas Krizek <tkrizek@redhat.com>
29882e
Date: Fri, 17 Feb 2017 14:30:13 +0100
29882e
Subject: [PATCH 1/3] Revert "BIND 9.11: use new public header isc/errno.h
29882e
 instead of private isc/errno2result.h"
29882e
29882e
This reverts commit 08da3390cfc0985abdc0f791115f0f595e915df6.
29882e
---
29882e
 configure.ac | 12 ++++++------
29882e
 src/fs.c     |  6 +++---
29882e
 2 files changed, 9 insertions(+), 9 deletions(-)
29882e
29882e
diff --git a/configure.ac b/configure.ac
29882e
index 50e41f3af667724accf9996c4167355c074ce00b..9e0f180699057e3d9f6a414868d123bf254fea50 100644
29882e
--- a/configure.ac
29882e
+++ b/configure.ac
29882e
@@ -105,18 +105,18 @@ int main(void) {
29882e
 [AC_MSG_ERROR([Cross compiling is not supported.])]
29882e
 )
29882e
 
29882e
-dnl isc_errno_toresult() was not available in older header files
29882e
-AC_MSG_CHECKING([isc_errno_toresult availability])
29882e
+dnl isc__errno2result() is typically not present in standard header files
29882e
+AC_MSG_CHECKING([isc__errno2result availability in header files])
29882e
 AC_TRY_RUN([
29882e
-#include <isc/errno.h>
29882e
+#include <isc/errno2result.h>
29882e
 int main(void) {
29882e
-	isc_errno_toresult(0);
29882e
+	isc__errno2result(0);
29882e
 	return 0;
29882e
 }],
29882e
 [AC_MSG_RESULT([yes])],
29882e
 [AC_MSG_ERROR([
29882e
- Can't find isc_errno_toresult() or header isc/errno.h:
29882e
- Please install bind-devel package or similar.])],
29882e
+ Can't find isc__errno2result() or header isc/errno2result.h:
29882e
+ Please install bind-lite-devel package or similar.])],
29882e
 [AC_MSG_ERROR([Cross compiling is not supported.])]
29882e
 )
29882e
 
29882e
diff --git a/src/fs.c b/src/fs.c
29882e
index 61c46b51f225488422fe680f568851e6dfcae8de..09b71d70ea4f15bc5122df1960933f47f0d44eda 100644
29882e
--- a/src/fs.c
29882e
+++ b/src/fs.c
29882e
@@ -10,7 +10,7 @@
29882e
 
29882e
 #include <isc/dir.h>
29882e
 #include <isc/file.h>
29882e
-#include <isc/errno.h>
29882e
+#include <isc/errno2result.h>
29882e
 #include <isc/result.h>
29882e
 #include <isc/string.h>
29882e
 #include <isc/util.h>
29882e
@@ -37,7 +37,7 @@ fs_dir_create(const char *dir_name)
29882e
 	if (ret == 0)
29882e
 		result = ISC_R_SUCCESS;
29882e
 	else
29882e
-		result = isc_errno_toresult(errno);
29882e
+		result = isc__errno2result(errno);
29882e
 
29882e
 	if (result != ISC_R_SUCCESS && result != ISC_R_FILEEXISTS) {
29882e
 		log_error_r("unable to create directory '%s', working directory "
29882e
@@ -50,7 +50,7 @@ fs_dir_create(const char *dir_name)
29882e
 		 * solely for this purpose. */
29882e
 		ret = chmod(dir_name, dir_mode);
29882e
 		if (ret != 0) {
29882e
-			result = isc_errno_toresult(errno);
29882e
+			result = isc__errno2result(errno);
29882e
 			log_error_r("unable to chmod directory '%s', "
29882e
 				    "working directory is '%s'",
29882e
 				    dir_name, dir_curr);
29882e
-- 
29882e
2.9.3
29882e