There appears to be a problem with one of the patches to enable mouse
scrolling at https://st.suckless.org/patches/scrollback/.

> git checkout 0.8
HEAD is now at 8ab6290 LICENSE: fix a few years
> curl https://st.suckless.org/patches/scrollback/st-scrollback-0.8.diff | git 
> apply
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8818    0  8818    0     0   7708      0 --:--:--  0:00:01 --:--:--  7708
> make
st build options:
CFLAGS  = -I/usr/X11R6/include  -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/freetype2
-I/usr/include/libpng16  -I/usr/include/freetype2
-I/usr/include/libpng16 -DVERSION="0.8" -D_XOPEN_SOURCE=600 -O
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft  -lfontconfig
-lfreetype  -lfreetype
CC      = c99
cp config.def.h config.h
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`
`pkg-config --cflags freetype2` -DVERSION=\"0.8\" -D_XOPEN_SOURCE=600
-O -c st.c
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`
`pkg-config --cflags freetype2` -DVERSION=\"0.8\" -D_XOPEN_SOURCE=600
-O -c x.c
c99 -o st st.o x.o -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft
`pkg-config --libs fontconfig`  `pkg-config --libs freetype2`
> curl https://st.suckless.org/patches/scrollback/st-scrollback-mouse-0.8.diff 
> | git apply
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1813    0  1813    0     0   1892      0 --:--:-- --:--:-- --:--:--  1890
> make
st build options:
CFLAGS  = -I/usr/X11R6/include  -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/freetype2
-I/usr/include/libpng16  -I/usr/include/freetype2
-I/usr/include/libpng16 -DVERSION="0.8" -D_XOPEN_SOURCE=600 -O
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft  -lfontconfig
-lfreetype  -lfreetype
CC      = c99
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`
`pkg-config --cflags freetype2` -DVERSION=\"0.8\" -D_XOPEN_SOURCE=600
-O -c st.c
c99 -I/usr/X11R6/include  `pkg-config --cflags fontconfig`
`pkg-config --cflags freetype2` -DVERSION=\"0.8\" -D_XOPEN_SOURCE=600
-O -c x.c
In file included from x.c:20:0:
x.c: In function ‘bpress’:
st.h:12:25: error: invalid application of ‘sizeof’ to incomplete type
‘MouseKey[] {aka struct <anonymous>[]}’
 #define LEN(a)   (sizeof(a) / sizeof(a)[0])
                         ^
x.c:428:32: note: in expansion of macro ‘LEN’
  for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
                                ^~~
Makefile:22: recipe for target 'x.o' failed
make: *** [x.o] Error 1
>

It seems that this patch is incorrect, though I'm not discounting the
possibility that I've done something wrong.

Reply via email to