FreeBSD Bugzilla – Attachment 183381 Details for
Bug 212572
devel/glib20: gio-enabled programs fail to write symbolic links (g-io-error-quark: Error opening file '{filename}' Too many links (0))
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
glocalfileoutputstream: Fix symlink writing on FreeBSD and NetBSD
glib.patch (text/plain), 2.03 KB, created by
Ting-Wei Lan
on 2017-06-10 13:13:19 UTC
(
hide
)
Description:
glocalfileoutputstream: Fix symlink writing on FreeBSD and NetBSD
Filename:
MIME Type:
Creator:
Ting-Wei Lan
Created:
2017-06-10 13:13:19 UTC
Size:
2.03 KB
patch
obsolete
>Index: files/patch-gio_glocalfileoutputstream.c >=================================================================== >--- files/patch-gio_glocalfileoutputstream.c (nonexistent) >+++ files/patch-gio_glocalfileoutputstream.c (working copy) >@@ -0,0 +1,38 @@ >+From 45d4b59e3f7ef7b41db08f0c11ee5000126cfedb Mon Sep 17 00:00:00 2001 >+From: Ting-Wei Lan <lantw@src.gnome.org> >+Date: Sun, 4 Dec 2016 15:02:54 +0800 >+Subject: [PATCH] glocalfileoutputstream: Fix symlink writing on FreeBSD and >+ NetBSD >+ >+FreeBSD, DragonflyBSD and NetBSD support O_NOFOLLOW, but they use error >+numbers that are different from what POSIX standard specifies. They are >+not going to change the behavior, and existing programs on these systems >+already take advantage of this difference. To support them, we have to >+add a check in GIO to use different error numbers on these systems. >+ >+https://bugzilla.gnome.org/show_bug.cgi?id=775593 >+--- >+ gio/glocalfileoutputstream.c | 6 ++++++ >+ 1 file changed, 6 insertions(+) >+ >+diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c >+index 81184a671..4b3733cce 100644 >+--- gio/glocalfileoutputstream.c >++++ gio/glocalfileoutputstream.c >+@@ -763,7 +763,13 @@ handle_overwrite_open (const char *filename, >+ #ifdef O_NOFOLLOW >+ is_symlink = FALSE; >+ fd = g_open (filename, open_flags | O_NOFOLLOW, mode); >++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) >++ if (fd == -1 && errno == EMLINK) >++#elif defined(__NetBSD__) >++ if (fd == -1 && errno == EFTYPE) >++#else >+ if (fd == -1 && errno == ELOOP) >++#endif >+ { >+ /* Could be a symlink, or it could be a regular ELOOP error, >+ * but then the next open will fail too. */ >+-- >+2.13.0 >+ > >Property changes on: files/patch-gio_glocalfileoutputstream.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
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
Flags:
lantw44
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 212572
: 183381