summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.h6
-rw-r--r--lockfile.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index 8e25fce..c2ea6f1 100644
--- a/cache.h
+++ b/cache.h
@@ -575,10 +575,10 @@ extern int refresh_index(struct index_state *, unsigned int flags, const struct
#define LOCK_SUFFIX_LEN 5
struct lock_file {
- struct lock_file *next;
+ struct lock_file *volatile next;
volatile sig_atomic_t active;
- int fd;
- pid_t owner;
+ volatile int fd;
+ volatile pid_t owner;
char on_list;
char filename[PATH_MAX];
};
diff --git a/lockfile.c b/lockfile.c
index d35ac44..89043f5 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -55,7 +55,7 @@
* on_list is set.
*/
-static struct lock_file *lock_file_list;
+static struct lock_file *volatile lock_file_list;
static void remove_lock_file(void)
{