Skip to content

Commit

Permalink
meson: wire up credential-wincred
Browse files Browse the repository at this point in the history
Fix an error when compiling with MSVC.

Signed-off-by: M Hickford <[email protected]>
  • Loading branch information
hickford committed Feb 13, 2025
1 parent e2067b4 commit 7ac8aa6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/credential/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if get_option('credential_wincred')
subdir('wincred')
endif
2 changes: 2 additions & 0 deletions contrib/credential/wincred/git-credential-wincred.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))

#ifndef _MSC_VER
__attribute__((format (printf, 1, 2)))
#endif
static void die(const char *err, ...)
{
char msg[4096];
Expand Down
1 change: 1 addition & 0 deletions contrib/credential/wincred/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
executable('git-credential-wincred', 'git-credential-wincred.c')
1 change: 1 addition & 0 deletions contrib/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
foreach feature : get_option('contrib')
subdir(feature)
endforeach
subdir('credential')
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ option('version', type: 'string', value: '',
# Features supported by Git.
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
description: 'Contributed features to include.')
option('credential_wincred', type: 'boolean', value: false,
description: 'Build helper git-credential-wincred. Requires Windows SDK.')
option('curl', type: 'feature', value: 'enabled',
description: 'Build helpers used to access remotes with the HTTP transport.')
option('expat', type: 'feature', value: 'enabled',
Expand Down

0 comments on commit 7ac8aa6

Please sign in to comment.