summary refs log tree commit diff
path: root/Src/Modules/watch.c
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-15 10:00:12 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-15 10:00:12 +0900
commita361b88717026c4af6d8d2d208ac4ac8b530f037 (patch)
tree6e8dbd8abeb89bc8b5dc86e83fc8b3768d216d99 /Src/Modules/watch.c
parent356dcb20cef387a5eea5f8fcbfe123b24e3bb928 (diff)
downloadzsh-a361b88717026c4af6d8d2d208ac4ac8b530f037.tar.gz
zsh-a361b88717026c4af6d8d2d208ac4ac8b530f037.tar.xz
zsh-a361b88717026c4af6d8d2d208ac4ac8b530f037.zip
49563: fix build problem of watch module on Cygwin
Diffstat (limited to 'Src/Modules/watch.c')
-rw-r--r--Src/Modules/watch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Modules/watch.c b/Src/Modules/watch.c
index 5ce604c63..95d591a67 100644
--- a/Src/Modules/watch.c
+++ b/Src/Modules/watch.c
@@ -640,8 +640,8 @@ static struct builtin bintab[] = {
 };
 
 static struct paramdef partab[] = {
-    PARAMDEF("WATCH", PM_SCALAR|PM_SPECIAL, &watch, &colonarr_gsu),
-    PARAMDEF("watch", PM_ARRAY|PM_SPECIAL, &watch, &vararray_gsu),
+    PARAMDEF("WATCH", PM_SCALAR|PM_SPECIAL, &watch, NULL),
+    PARAMDEF("watch", PM_ARRAY|PM_SPECIAL, &watch, NULL),
 };
 
 static struct features module_features = {
@@ -656,6 +656,10 @@ static struct features module_features = {
 int
 setup_(UNUSED(Module m))
 {
+    /* On Cygwin, colonarr_gsu exists in libzsh.dll and we can't
+     * use &colonarr_gsu in the initialization of partab[] above */
+    partab[0].gsu = (void *)&colonarr_gsu;
+    partab[1].gsu = (void *)&vararray_gsu;
     return 0;
 }