diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-04 16:37:04 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-03-19 22:14:02 +0100 |
commit | 26590d31f492dbbd36be6d0bde46a4bd3b221edb (patch) | |
tree | 609094c17e2d97134e7b9369df0c54f437c63e7c /src | |
parent | 754b09b5444e6da88ed58d6deaed8b815e268b6b (diff) | |
download | sssd-26590d31f492dbbd36be6d0bde46a4bd3b221edb.tar.gz sssd-26590d31f492dbbd36be6d0bde46a4bd3b221edb.tar.xz sssd-26590d31f492dbbd36be6d0bde46a4bd3b221edb.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
Diffstat (limited to 'src')
-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) |