Print

Print


I had to apply this patch in order to build on FreeBSD (compiler is clang-6).
Problems corrected by the patch:

  1. Missing ":"
  2. Missing ","
  3. Missing "name" argument
-- src/XrdSys/XrdSysFAttrBsd.icc.orig  2018-08-01 05:55:51 UTC
+++ src/XrdSys/XrdSysFAttrBsd.icc
@@ -68,7 +68,7 @@ int XrdSysFAttr::Get(const char *Aname, 
 // Obtain the attribute.
 //
    ec = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz)
-                  extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz));
+                : extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz));

 // Diagnose errors. We return 0 on ENOENT to indicate no attribute.
 //
@@ -89,8 +89,8 @@ int XrdSysFAttr::List(AList **aPL, const
 // First obtain the amount of storage we will need for the whole list
 //
    *aPL = 0;
-   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, 0, 0)
-                    extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, 0, 0));
+   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, "", 0, 0)
+                  : extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, 0, 0));
    if (Tlen < 0)
       {if ((ec = Diagnose("list", "*", Path, errno)) == -ENOENT) ec = 0;
        return ec;
@@ -109,8 +109,8 @@ int XrdSysFAttr::List(AList **aPL, const
 // Now get the actual list. We will not recover if someone added an attribute
 // since the time we actual determined the size of the buffer we need.
 //
-   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, Buff, Tlen)
-                    extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, Buff, Tlen));
+   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, "", Buff, Tlen)
+                  : extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, Buff, Tlen));
    if (Tlen < 0)
       {if ((ec = Diagnose("list", "*", Path, errno)) == -ENOENT) ec = 0;
        free(Buff);
@@ -160,7 +160,7 @@ int XrdSysFAttr::Set(const char *Aname, 
 //
   if (isNew)
      {ec = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER,Aname,0,0)
[yuri@yv /usr/ports/databases/xrootd/files]$ cat patch-src_XrdSys_XrdSysFAttrBsd.icc 
--- src/XrdSys/XrdSysFAttrBsd.icc.orig	2018-08-01 05:55:51 UTC
+++ src/XrdSys/XrdSysFAttrBsd.icc
@@ -68,7 +68,7 @@ int XrdSysFAttr::Get(const char *Aname, 
 // Obtain the attribute.
 //
    ec = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz)
-                  extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz));
+                : extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,Aval,Avsz));
 
 // Diagnose errors. We return 0 on ENOENT to indicate no attribute.
 //
@@ -89,8 +89,8 @@ int XrdSysFAttr::List(AList **aPL, const
 // First obtain the amount of storage we will need for the whole list
 //
    *aPL = 0;
-   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, 0, 0)
-                    extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, 0, 0));
+   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, "", 0, 0)
+                  : extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, 0, 0));
    if (Tlen < 0)
       {if ((ec = Diagnose("list", "*", Path, errno)) == -ENOENT) ec = 0;
        return ec;
@@ -109,8 +109,8 @@ int XrdSysFAttr::List(AList **aPL, const
 // Now get the actual list. We will not recover if someone added an attribute
 // since the time we actual determined the size of the buffer we need.
 //
-   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, Buff, Tlen)
-                    extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, Buff, Tlen));
+   Tlen = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER, "", Buff, Tlen)
+                  : extattr_list_fd(   fd,EXTATTR_NAMESPACE_USER, Buff, Tlen));
    if (Tlen < 0)
       {if ((ec = Diagnose("list", "*", Path, errno)) == -ENOENT) ec = 0;
        free(Buff);
@@ -160,7 +160,7 @@ int XrdSysFAttr::Set(const char *Aname, 
 //
   if (isNew)
      {ec = (fd < 0 ? extattr_get_file(Path,EXTATTR_NAMESPACE_USER,Aname,0,0)
-                   : extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,0 0));
+                   : extattr_get_fd(  fd,  EXTATTR_NAMESPACE_USER,Aname,0,0));
       if (ec >= 0) return -EEXIST;
      }


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"XrdSysFAttrBsd.icc patch (#791)"}],"action":{"name":"View Issue","url":"https://github.com/xrootd/xrootd/issues/791"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/791", "url": "https://github.com/xrootd/xrootd/issues/791", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "XrdSysFAttrBsd.icc patch (#791)", "sections": [ { "text": "", "activityTitle": "**yuri@FreeBSD**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@yurivict", "facts": [ { "name": "Repository: ", "value": "xrootd/xrootd" }, { "name": "Issue #: ", "value": 791 } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"xrootd/xrootd\",\n\"issueId\": 791,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"xrootd/xrootd\",\n\"issueId\": 791\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/xrootd/xrootd/issues/791" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 363633477\n}" } ], "themeColor": "26292E" } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1