[warnings] fix -Wempty-translation-unit

This commit is contained in:
akallabeth 2023-05-23 09:05:48 +02:00 committed by Martin Fleisz
parent 9f1b13cf0a
commit ab677f8abe
3 changed files with 12 additions and 6 deletions

View File

@ -70,8 +70,6 @@ if (WITH_KRB5)
find_package(KRB5 REQUIRED)
list(APPEND ${MODULE_PREFIX}_KERBEROS_SRCS
Kerberos/krb5glue_mit.c
Kerberos/krb5glue_heimdal.c
Kerberos/krb5glue.h)
winpr_include_directory_add(${KRB5_INCLUDEDIR})
@ -86,8 +84,14 @@ if (WITH_KRB5)
if(KRB5_FLAVOUR STREQUAL "MIT")
winpr_definition_add("-DWITH_KRB5_MIT")
list(APPEND ${MODULE_PREFIX}_KERBEROS_SRCS
Kerberos/krb5glue_mit.c
)
elseif(KRB5_FLAVOUR STREQUAL "Heimdal")
winpr_definition_add("-DWITH_KRB5_HEIMDAL")
list(APPEND ${MODULE_PREFIX}_KERBEROS_SRCS
Kerberos/krb5glue_heimdal.c
)
else()
message(WARNING "Kerberos version not detected")
endif()

View File

@ -17,7 +17,9 @@
* limitations under the License.
*/
#ifdef WITH_KRB5_HEIMDAL
#ifndef WITH_KRB5_HEIMDAL
#error "This file must ony be included with HEIMDAL kerberos"
#endif
#include <winpr/endian.h>
#include <winpr/wlog.h>
@ -209,4 +211,3 @@ krb5_error_code krb5glue_get_init_creds(krb5_context ctx, krb5_principal princ,
return rv;
}
#endif /* WITH_KRB5_HEIMDAL */

View File

@ -17,7 +17,9 @@
* limitations under the License.
*/
#ifdef WITH_KRB5_MIT
#ifndef WITH_KRB5_MIT
#error "This file must only be included with MIT kerberos"
#endif
#include <winpr/path.h>
#include <winpr/wlog.h>
@ -225,4 +227,3 @@ cleanup:
return rv;
}
#endif /* WITH_KRB5_MIT */