diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-04 16:37:04 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-05 23:28:01 +0100 |
commit | c99a359e4499f2669bb14b7971383cbbc4a29c69 (patch) | |
tree | fa13f3c3b17cc7d80a8141645a0c3273f337e6bf | |
parent | dc8e7148d7a0d02ee289e20e3a904c43c83a5375 (diff) | |
download | sssd-c99a359e4499f2669bb14b7971383cbbc4a29c69.tar.gz sssd-c99a359e4499f2669bb14b7971383cbbc4a29c69.tar.xz sssd-c99a359e4499f2669bb14b7971383cbbc4a29c69.zip |
Do not compile main() in DP if UNIT_TESTING is defined
The simple access provider unit tests now need to link against the Data
Provider when they start using the be_file_account_request() function.
But then we would start having conflicts as at least the main()
functions would clash.
If UNIT_TESTING is defined, then the data_provider_be.c module does not
contain the main() function and can be linked against directly from
another module that contains its own main() function
-rw-r--r-- | src/providers/data_provider_be.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index f85a04d09..33590aeef 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -2651,6 +2651,7 @@ fail: return ret; } +#ifndef UNIT_TESTING int main(int argc, const char *argv[]) { int opt; @@ -2732,6 +2733,7 @@ int main(int argc, const char *argv[]) return 0; } +#endif static int data_provider_res_init(DBusMessage *message, struct sbus_connection *conn) |