tuxera / ntfs-3g

NTFS-3G Safe Read/Write NTFS Driver
https://www.tuxera.com/company/open-source
GNU General Public License v2.0
988 stars 149 forks source link

Deprecation warning in macOS Catalina #12

Closed paaguti closed 3 years ago

paaguti commented 3 years ago

Just FYI:

compiling 2021.8.22 on macOS Catalina

gcc -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include  -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse -I../include/ntfs-3g -DPLUGIN_DIR=\"/usr/local/lib/ntfs-3g\" -arch x86_64 -Os -Wall -c -o lowntfs_3g-ntfs-3g_common.o `test -f 'ntfs-3g_common.c' || echo './'`ntfs-3g_common.c
ntfs-3g.c:4301:7: warning: 'daemon' is deprecated: first deprecated in macOS
      10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
                if (daemon(0, ctx->debug))
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:292:6:gcc -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include  -DFUSE_USE_VERSION=26 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse -I../include/ntfs-3g -DPLUGIN_DIR=\"/usr/local/lib/ntfs-3g\" -arch x86_64 -Os -Wall -c -o lowntfs_3g-ntfs-3g_common.o `test -f 'ntfs-3g_common.c' || echo './'`ntfs-3g_common.c
ntfs-3g.c:4301:7: warning: 'daemon' is deprecated: first deprecated in macOS
      10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
                if (daemon(0, ctx->debug))
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:292:6:
unsound commented 3 years ago

While it would be desirable to eliminate this function call to get rid of a deprecation warning, daemon isn't going away. It was deprecated back in Mac OS X 10.5 (2007) and it's still with us today and for a good reason. There's no good replacement either, except forking manually and doing what daemon is already doing for us, just without calling the function daemon(...) which seems like a pointless exercise. So for now I'll close this as "won't fix", and if Apple ever decides to actually remove the libc function then we can reopen the issue.

paaguti commented 3 years ago

Fine with me... I'm panicking at the thought of BugSur, which will be my next step, after all the work of getting OSXFuse running and NTFS-3g compiling in my MacBook AIr ;-)

Thx for the software, /PA

On Mon, 1 Nov 2021 at 09:48, Erik Larsson @.***> wrote:

While it would be desirable to eliminate this syscall to get rid of a deprecation warning, daemon isn't going away. It was deprecated back in Mac OS X 10.5 (2007) and it's still with us today and for a good reason. There's no good replacement either, except forking manually and doing what daemon is already doing for us, just without calling the function daemon(...) which seems like a pointless exercise. So for now I'll close this as "won't fix", and if Apple ever decides to actually remove the syscall then we can reopen the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tuxera/ntfs-3g/issues/12#issuecomment-956044960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4HB3RSYADBJXCJTAP3UJZH6VANCNFSM5HA7JUQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler