# [PATCH] Makefile: suppress macOS deprecation warning

5 messages from 2022-11-19 to 2022-12-01. Participants: Stefan Sundin via GitGitGadget, Bagas Sanjaya, Stefan Sundin, Jeff Hostetler.
Thread: https://gitlist.dev/t/58821

## Stefan Sundin via GitGitGadget, 2022-11-19 20:06

Subject: [PATCH] Makefile: suppress macOS deprecation warning
Message-ID: <pull.1422.git.1668888407433.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.1422.git.1668888407433.gitgitgadget%40gmail.com

```
From: Stefan Sundin <git@stefansundin.com>

Compiling git on macOS 13 emits the following deprecation warning:

        CC compat/fsmonitor/fsm-listen-darwin.o
    compat/fsmonitor/fsm-listen-darwin.c:495:2: warning: 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead. [-Wdeprecated-declarations]
            FSEventStreamScheduleWithRunLoop(data->stream, data->rl, kCFRunLoopDefaultMode);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:1138:1: note: 'FSEventStreamScheduleWithRunLoop' has been explicitly marked deprecated here
    FSEventStreamScheduleWithRunLoop(
    ^
    1 warning generated.

Setting a minimum macOS version will suppress this deprecation warning.
Using a version lower than 10.13 will cause other warning messages to
be emitted.

Signed-off-by: Stefan Sundin <git@stefansundin.com>
---
    Makefile: suppress macOS deprecation warning

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1422%2Fstefansundin%2Fmacosx-version-min-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1422/stefansundin/macosx-version-min-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1422

 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 4927379184c..8a729efd2d1 100644
--- a/Makefile
+++ b/Makefile
@@ -1430,6 +1430,7 @@ ifneq (,$(SOCKLEN_T))
 endif
 
 ifeq ($(uname_S),Darwin)
+	BASIC_CFLAGS += -mmacosx-version-min=10.13
 	ifndef NO_FINK
 		ifeq ($(shell test -d /sw/lib && echo y),y)
 			BASIC_CFLAGS += -I/sw/include

base-commit: eea7033409a0ed713c78437fc76486983d211e25
-- 
gitgitgadget

```

## Bagas Sanjaya, 2022-11-20 01:48

Subject: Re: [PATCH] Makefile: suppress macOS deprecation warning
Message-ID: <a3cfe081-1e68-edda-b797-e68356988046@gmail.com>
URL: https://gitlist.dev/e/a3cfe081-1e68-edda-b797-e68356988046%40gmail.com
In-Reply-To: <pull.1422.git.1668888407433.gitgitgadget@gmail.com>

```
On 11/20/22 03:06, Stefan Sundin via GitGitGadget wrote:
> From: Stefan Sundin <git@stefansundin.com>
> 
> Compiling git on macOS 13 emits the following deprecation warning:
> 
>         CC compat/fsmonitor/fsm-listen-darwin.o
>     compat/fsmonitor/fsm-listen-darwin.c:495:2: warning: 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead. [-Wdeprecated-declarations]
>             FSEventStreamScheduleWithRunLoop(data->stream, data->rl, kCFRunLoopDefaultMode);
>             ^
>     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:1138:1: note: 'FSEventStreamScheduleWithRunLoop' has been explicitly marked deprecated here
>     FSEventStreamScheduleWithRunLoop(
>     ^
>     1 warning generated.
> 
> Setting a minimum macOS version will suppress this deprecation warning.
> Using a version lower than 10.13 will cause other warning messages to
> be emitted.
> 

Why don't instead follow the suggestion on the warning message
(FSEventStreamSetDispatchQueue) instead?

-- 
An old man doll... just what I always wanted! - Clara


```

## Stefan Sundin, 2022-11-20 02:14

Subject: Re: [PATCH] Makefile: suppress macOS deprecation warning
Message-ID: <CAMDaVWGFi6CD+MMbWG=N57yyb8=k6AouB5h33NkKvs2q4UxRmQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAMDaVWGFi6CD%2BMMbWG%3DN57yyb8%3Dk6AouB5h33NkKvs2q4UxRmQ%40mail.gmail.com
In-Reply-To: <a3cfe081-1e68-edda-b797-e68356988046@gmail.com>

```
On Sat, Nov 19, 2022 at 5:48 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>
> On 11/20/22 03:06, Stefan Sundin via GitGitGadget wrote:
> > From: Stefan Sundin <git@stefansundin.com>
> >
> > Compiling git on macOS 13 emits the following deprecation warning:
> >
> >         CC compat/fsmonitor/fsm-listen-darwin.o
> >     compat/fsmonitor/fsm-listen-darwin.c:495:2: warning: 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead. [-Wdeprecated-declarations]
> >             FSEventStreamScheduleWithRunLoop(data->stream, data->rl, kCFRunLoopDefaultMode);
> >             ^
> >     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:1138:1: note: 'FSEventStreamScheduleWithRunLoop' has been explicitly marked deprecated here
> >     FSEventStreamScheduleWithRunLoop(
> >     ^
> >     1 warning generated.
> >
> > Setting a minimum macOS version will suppress this deprecation warning.
> > Using a version lower than 10.13 will cause other warning messages to
> > be emitted.
> >
>
> Why don't instead follow the suggestion on the warning message
> (FSEventStreamSetDispatchQueue) instead?
>
> --
> An old man doll... just what I always wanted! - Clara

You are right, Bagas. I assumed, without actually looking it up, that
the new function had a higher-than-acceptable minimum macOS version
requirement. It turns out that the new function was added in 10.6
which is far better than requiring 10.13.

Please disregard this patch and I will attempt to update the code to
use the new function instead.

```

## Bagas Sanjaya, 2022-11-20 12:29

Subject: Re: [PATCH] Makefile: suppress macOS deprecation warning
Message-ID: <4e0ecd76-8bd3-c1c4-69ca-a2de4886f491@gmail.com>
URL: https://gitlist.dev/e/4e0ecd76-8bd3-c1c4-69ca-a2de4886f491%40gmail.com
In-Reply-To: <CAMDaVWGFi6CD+MMbWG=N57yyb8=k6AouB5h33NkKvs2q4UxRmQ@mail.gmail.com>

```
On 11/20/22 09:14, Stefan Sundin wrote:
> You are right, Bagas. I assumed, without actually looking it up, that
> the new function had a higher-than-acceptable minimum macOS version
> requirement. It turns out that the new function was added in 10.6
> which is far better than requiring 10.13.
> 
> Please disregard this patch and I will attempt to update the code to
> use the new function instead.

OK. But unfortunately, I don't have any macOS machines handy, so I can't
test your future patch.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara


```

## Jeff Hostetler, 2022-12-01 18:53

Subject: Re: [PATCH] Makefile: suppress macOS deprecation warning
Message-ID: <7ef9ed2b-101d-ab00-3126-3b23990b9b19@jeffhostetler.com>
URL: https://gitlist.dev/e/7ef9ed2b-101d-ab00-3126-3b23990b9b19%40jeffhostetler.com
In-Reply-To: <4e0ecd76-8bd3-c1c4-69ca-a2de4886f491@gmail.com>

```


On 11/20/22 7:29 AM, Bagas Sanjaya wrote:
> On 11/20/22 09:14, Stefan Sundin wrote:
>> You are right, Bagas. I assumed, without actually looking it up, that
>> the new function had a higher-than-acceptable minimum macOS version
>> requirement. It turns out that the new function was added in 10.6
>> which is far better than requiring 10.13.
>>
>> Please disregard this patch and I will attempt to update the code to
>> use the new function instead.
> 
> OK. But unfortunately, I don't have any macOS machines handy, so I can't
> test your future patch.
> 
> Thanks.
> 

As I mentioned in another thread, I'm working on a solution
for this deprecated function.  As soon the CI builds finish
I'll submit it.

Jeff

```
