]> git.saurik.com Git - apple/dyld.git/blame_incremental - unit-tests/test-cases/rpath-dlopen-indirect/bar.c
dyld-851.27.tar.gz
[apple/dyld.git] / unit-tests / test-cases / rpath-dlopen-indirect / bar.c
... / ...
CommitLineData
1
2#include <stdio.h>
3#include <stdlib.h>
4#include <dlfcn.h>
5
6#include "test.h"
7
8void bar()
9{
10 void* handle = dlopen("libfoo.dylib", RTLD_LAZY);
11 if ( handle == NULL ) {
12 FAIL("rpath-dlopen-indirect: %s", dlerror());
13 exit(EXIT_SUCCESS);
14 }
15
16 void* pFoo = dlsym(handle, "foo");
17 if ( pFoo == NULL ) {
18 FAIL("rpath-dlopen-indirect: %s", dlerror());
19 exit(EXIT_SUCCESS);
20 }
21}
22
23