Fix permission setting for glslang validator

This commit is contained in:
Pierre Krieger 2016-02-05 16:37:48 +01:00
parent b6a3b3c598
commit b67b96a49e

View File

@ -26,11 +26,11 @@ fn main() {
// setting permissions of the executable
{
#[cfg(linux)] fn permissions() -> Option<Permissions> {
#[cfg(unix)] fn permissions() -> Option<Permissions> {
use std::os::unix::fs::PermissionsExt;
Some(Permissions::from_mode(755))
}
#[cfg(not(linux))] fn permissions() -> Option<Permissions> { None }
#[cfg(not(unix))] fn permissions() -> Option<Permissions> { None }
if let Some(permissions) = permissions() {
fs::set_permissions(&out_file, permissions).unwrap();
}