diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2009-09-25 00:28:45 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2009-09-25 00:28:45 -0700 |
commit | a17338ce9081f8574d920d8d39438a6844b9a300 (patch) | |
tree | f7494466eafbe24f6ac22b3c82d3aa28f571d7e9 | |
parent | cecbfa7d6ca793d411a43c5bc2d434e89472572e (diff) |
190.36190.36
-rw-r--r-- | DRIVER_VERSION | 2 | ||||
-rw-r--r-- | command-list.c | 1 | ||||
-rw-r--r-- | files.c | 25 |
3 files changed, 24 insertions, 4 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION index 4ba150c..340fc52 100644 --- a/DRIVER_VERSION +++ b/DRIVER_VERSION @@ -1 +1 @@ -190.32 +190.36 diff --git a/command-list.c b/command-list.c index 3e83c98..d78ae24 100644 --- a/command-list.c +++ b/command-list.c @@ -625,6 +625,7 @@ static void find_conflicting_kernel_modules(Options *op, char *paths[3]; char *tmp = get_kernel_name(op); + memset(files, 0, sizeof(files)); files[1].name = NULL; files[1].len = 0; paths[0] = op->kernel_module_installation_path; @@ -1925,9 +1925,6 @@ void get_default_prefixes_and_paths(Options *op) } #if defined(NV_X86_64) - if (op->distro == DEBIAN && !op->compat32_chroot) - op->compat32_chroot = DEBIAN_DEFAULT_COMPAT32_CHROOT; - if (!op->compat32_prefix) op->compat32_prefix = DEFAULT_OPENGL_PREFIX; @@ -1939,6 +1936,28 @@ void get_default_prefixes_and_paths(Options *op) op->compat32_libdir = DEFAULT_LIBDIR; } } + + if (op->distro == DEBIAN && !op->compat32_chroot) { + /* + * Newer versions of Debian have moved to the Ubuntu style of compat32 + * path, so use that if it exists. + */ + char *default_path = nvstrcat(op->compat32_prefix, "/" + UBUNTU_DEFAULT_COMPAT32_LIBDIR, NULL); + struct stat buf; + if (lstat(default_path, &buf) < 0 || S_ISLNK(buf.st_mode)) { + /* + * Path doesn't exist or is a symbolic link. Use the compat32 + * chroot path instead. + */ + op->compat32_chroot = DEBIAN_DEFAULT_COMPAT32_CHROOT; + } else { + /* <prefix>/lib32 exists, so use that */ + op->compat32_libdir = UBUNTU_DEFAULT_COMPAT32_LIBDIR; + } + nvfree(default_path); + } + #endif if (!op->utility_prefix) |