diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2006-03-02 22:58:41 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2006-03-02 22:58:41 +0000 |
commit | 8764fa44d725c708db18dff860aded25ebaa37f0 (patch) | |
tree | 492a538552cc1d024f46438dc8eeb1aeb8a34d92 | |
parent | 329d18e98c237cf5d5d6d9711d4f5a5218bc0217 (diff) | |
download | apr-8764fa44d725c708db18dff860aded25ebaa37f0.tar.gz |
The second half of the last commit. Follow the only API we found
for uuid_create and test the result value for uuid_s_ok. This matches
the configure.in tests, and is therefore safe to assume it -does- build
correctly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@382543 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | misc/unix/rand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/unix/rand.c b/misc/unix/rand.c index 2e0d8353e..c9723f5ff 100644 --- a/misc/unix/rand.c +++ b/misc/unix/rand.c @@ -53,9 +53,13 @@ APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data) { + uint32_t rv; uuid_t g; - uuid_create(&g, NULL); + uuid_create(&g, &rv); + + if (rv != uuid_s_ok) + APR_EGENERAL; memcpy(uuid_data, &g, sizeof(uuid_t)); |