summaryrefslogtreecommitdiff
path: root/deps/gyp/pylib/gyp/flock_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/pylib/gyp/flock_tool.py')
-rwxr-xr-xdeps/gyp/pylib/gyp/flock_tool.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/gyp/pylib/gyp/flock_tool.py b/deps/gyp/pylib/gyp/flock_tool.py
index 3e7efff26e..b38d8660f7 100755
--- a/deps/gyp/pylib/gyp/flock_tool.py
+++ b/deps/gyp/pylib/gyp/flock_tool.py
@@ -40,7 +40,12 @@ class FlockTool(object):
# with EBADF, that's why we use this F_SETLK
# hack instead.
fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0666)
- op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
+ if sys.platform.startswith('aix'):
+ # Python on AIX is compiled with LARGEFILE support, which changes the
+ # struct size.
+ op = struct.pack('hhIllqq', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
+ else:
+ op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
fcntl.fcntl(fd, fcntl.F_SETLK, op)
return subprocess.call(cmd_list)