Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 732337 Details for
Bug 807766
net-libs/libnftnl-1.2.0 wrong snprintf substitution with clang-cpp and -D_FORTIFY_SOURCE
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix building on clang
snprintf.patch (text/plain), 1.00 KB, created by
Jannik Glückert
on 2021-08-11 21:26:49 UTC
(
hide
)
Description:
fix building on clang
Filename:
MIME Type:
Creator:
Jannik Glückert
Created:
2021-08-11 21:26:49 UTC
Size:
1.00 KB
patch
obsolete
>diff --git a/src/expr.c b/src/expr.c >index 277bbde..8489c2a 100644 >--- a/src/expr.c >+++ b/src/expr.c >@@ -279,10 +279,13 @@ int nftnl_expr_snprintf(char *buf, size_t remain, const struct nftnl_expr *expr, > if (remain) > buf[0] = '\0'; > >+ #pragma push_macro("snprintf") >+ #undef snprintf > if (!expr->ops->snprintf || type != NFTNL_OUTPUT_DEFAULT) > return 0; > > ret = expr->ops->snprintf(buf + offset, remain, flags, expr); >+ #pragma pop_macro("snprintf") > SNPRINTF_BUFFER_SIZE(ret, remain, offset); > > return offset; >diff --git a/src/object.c b/src/object.c >index 46e208b..e686291 100644 >--- a/src/object.c >+++ b/src/object.c >@@ -396,7 +396,10 @@ static int nftnl_obj_snprintf_dflt(char *buf, size_t remain, > SNPRINTF_BUFFER_SIZE(ret, remain, offset); > > if (obj->ops) { >+ #pragma push_macro("snprintf") >+ #undef snprintf > ret = obj->ops->snprintf(buf + offset, remain, flags, obj); >+ #pragma pop_macro("snprintf") > SNPRINTF_BUFFER_SIZE(ret, remain, offset); > } > ret = snprintf(buf + offset, remain, "]");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 807766
: 732337 |
757132