Commit 61d045c0 authored by johnmartin-oracle's avatar johnmartin-oracle Committed by Aaron Plattner
Browse files

test: Use libXext.so.0 instead of libXext.so.6 on Solaris


Reviewed-by: default avatarAaron Plattner <aplattner@nvidia.com>
parent f1fa72e9
...@@ -28,13 +28,19 @@ static int countOpenFDs(void) ...@@ -28,13 +28,19 @@ static int countOpenFDs(void)
return count; return count;
} }
#if defined(__sun)
static const char libXext_so[] = "libXext.so.0";
#else
static const char libXext_so[] = "libXext.so.6";
#endif
int main(void) int main(void)
{ {
// Work around a bug in libXext: dlclosing it after it has registered the // Work around a bug in libXext: dlclosing it after it has registered the
// Generic Event Extension causes an identical bug to the one this program // Generic Event Extension causes an identical bug to the one this program
// is trying to test for. // is trying to test for.
int nOpenFDs = countOpenFDs(); int nOpenFDs = countOpenFDs();
void *libXext = dlopen("libXext.so.6", RTLD_LAZY); void *libXext = dlopen(libXext_so, RTLD_LAZY);
void *libvdpau = dlopen("src/libvdpau.so", RTLD_LAZY); void *libvdpau = dlopen("src/libvdpau.so", RTLD_LAZY);
Display *dpy = XOpenDisplay(NULL); Display *dpy = XOpenDisplay(NULL);
VdpDeviceCreateX11 *pvdp_device_create_x11; VdpDeviceCreateX11 *pvdp_device_create_x11;
...@@ -43,7 +49,7 @@ int main(void) ...@@ -43,7 +49,7 @@ int main(void)
VdpStatus status; VdpStatus status;
if (!libXext) { if (!libXext) {
fprintf(stderr, "Failed to open libXext.so.6: %s", dlerror()); fprintf(stderr, "Failed to open %s: %s", libXext_so, dlerror());
return SKIP; return SKIP;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment