marvinkreis / rofi-file-browser-extended

Use rofi to quickly open files
MIT License
240 stars 15 forks source link

Build fails with undeclared identifier #20

Closed anoduck closed 2 years ago

anoduck commented 4 years ago

I run OpenBSD and am recieving the following errors attempting to build the files:

/home/USER/rofi-file-browser-extended/src/files.c:124:65: error: use of undeclared identifier 'FTW_ACTIONRETVAL'
    int nftw_flags = fd->follow_symlinks ? FTW_ACTIONRETVAL : ( FTW_ACTIONRETVAL | FTW_PHYS );
                                                                ^
/home/USER/rofi-file-browser-extended/src/files.c:124:44: error: use of undeclared identifier 'FTW_ACTIONRETVAL'
    int nftw_flags = fd->follow_symlinks ? FTW_ACTIONRETVAL : ( FTW_ACTIONRETVAL | FTW_PHYS );
                                           ^
/home/USER/rofi-file-browser-extended/src/files.c:181:16: error: use of undeclared identifier 'FTW_CONTINUE'
        return FTW_CONTINUE;
               ^
/home/USER/rofi-file-browser-extended/src/files.c:184:16: error: use of undeclared identifier 'FTW_SKIP_SUBTREE'
        return FTW_SKIP_SUBTREE;
               ^
/home/USER/rofi-file-browser-extended/src/files.c:187:16: error: use of undeclared identifier 'FTW_SKIP_SUBTREE'
        return FTW_SKIP_SUBTREE;
               ^
/home/USER/rofi-file-browser-extended/src/files.c:259:16: error: use of undeclared identifier 'FTW_SKIP_SUBTREE'
        return FTW_SKIP_SUBTREE;
               ^
/home/USER/rofi-file-browser-extended/src/files.c:261:16: error: use of undeclared identifier 'FTW_CONTINUE'
        return FTW_CONTINUE;
               ^
7 errors generated.
*** Error 1 in . (CMakeFiles/filebrowser.dir/build.make:89 'CMakeFiles/filebrowser.dir/src/files.c.o': /usr/bin/cc -Dfilebrowser_EXPORTS -I/...)
*** Error 1 in . (CMakeFiles/Makefile2:105 'CMakeFiles/filebrowser.dir/all')
*** Error 1 in /home/USER/rofi-file-browser-extended (Makefile:130 'all')

Not sure where ntfw_flags is coming from? I was able to compile libnkutils independently, but had difficulty compiling it as a submodule for some reason.

marvinkreis commented 4 years ago

Hi. The problem is that I currently use the GNU extension of the nftw function to list files. I am planning to change this, since it is not compatible with OpenBSD. I've pushed some changes to the develop branch to remove nftw, so you can use that for now (but it doesn't handle recursive symlinks yet).

marvinkreis commented 4 years ago

Oh, and it would be nice if you could tell me if the version on the develop branch compiles on OpenBSD, because I don't have an installation to test it on :).

anoduck commented 4 years ago

@marvinkreis, I am going to have to fiddle with this for a while. Getting tripped up building the man pages, and right now after taking final exams, my brain is to sleep deprived to recall how to disable building doc with cmake.

jirutka commented 2 years ago

I encountered the same problem on Alpine Linux (musl libc).

anoduck commented 2 years ago

@jirutka Thanks. Big fan of Alpine Linux, use it on my laptop.

jirutka commented 2 years ago

Glad to hear that! :) You can now install package rofi-file-browser-extended from Alpine Edge.

anoduck commented 2 years ago

Glad to hear that! :) You can now install package rofi-file-browser-extended from Alpine Edge.

Sweetness!