]> arthur.barton.de Git - netatalk.git/commitdiff
Solaris fixes
authorFrank Lahm <franklahm@googlemail.com>
Sat, 28 Jan 2012 15:25:56 +0000 (16:25 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Sat, 28 Jan 2012 15:25:56 +0000 (16:25 +0100)
libatalk/adouble/ad_open.c
macros/netatalk.m4

index 2e2d686c358df16d7420ba5081617f97575fab1d..4b78d467359d522d16550f264e2fe179cf31b51e 100644 (file)
@@ -1051,7 +1051,7 @@ static int ad_reso_size(const char *path, int adflags, struct adouble *ad)
         EC_NEG1( eafd = sys_getxattrfd(path, AD_EA_RESO, O_RDONLY) );
         opened = 1;
     }
-    EC_NEG1( rlen = fstat(eafd, &st) );
+    EC_NEG1( fstat(eafd, &st) );
     ad->ad_rlen = st.st_size;
 #else
     const char *rfpath;
@@ -1114,11 +1114,11 @@ static int ad_open_rf(const char *path, int adflags, int mode, struct adouble *a
         goto EC_CLEANUP;
     }
 #ifdef HAVE_EAFD
-    if ((ad_reso_fileno(ad) = sys_getxattrfd(path, oflags)) == -1) {
+    if ((ad_reso_fileno(ad) = sys_getxattrfd(path, AD_EA_RESO, oflags)) == -1) {
         if (!(adflags & ADFLAGS_CREATE))
             EC_FAIL;
         oflags |= O_CREAT;
-        EC_NEG1_LOG( ad_reso_fileno(ad) = sys_getxattrfd(path, oflags, 0666) ); 
+        EC_NEG1_LOG( ad_reso_fileno(ad) = sys_getxattrfd(path, AD_EA_RESO, oflags, 0666) ); 
     }
 #else
     EC_NULL_LOG( rfpath = ad->ad_ops->ad_path(path, adflags) );
@@ -1600,6 +1600,7 @@ int ad_refresh(const char *path, struct adouble *ad)
             // TODO: read meta EA
         }
 
+#if 0
         if (AD_RSRC_OPEN(ad)) {
             if (ad_reso_fileno(ad) == -1)
                 return -1;
@@ -1608,6 +1609,7 @@ int ad_refresh(const char *path, struct adouble *ad)
                 return -1;
             ad->ad_rlen = len;
         }
+#endif
 #else
         if (AD_META_OPEN(ad)) {
             if (ad_data_fileno(ad) == -1)
index 4b136177b25b21620740aba4f432b26effcca2e7..9237affeb39cdf82e4f76c70836446b3b4cd955e 100644 (file)
@@ -630,7 +630,7 @@ case "$this_os" in
 
   *solaris*)
        AC_CHECK_FUNCS([attropen],
-                   [neta_cv_eas_sys_found=yes],
+                   [neta_cv_eas_sys_found=yes; AC_DEFINE(HAVE_EAFD, 1, [extattr API has full fledged fds for EAs])],
                    [neta_cv_eas_sys_not_found=yes])
   ;;