]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/tools/build/src/engine/fileunix.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / engine / fileunix.cpp
index 4c1b6adf3493ffbe2de7a0e9e44cc2a24209256d..4982c9bb82130a8cfd0bc3ebaf136f0c42afd106 100644 (file)
@@ -8,7 +8,7 @@
  *  Copyright 2001-2004 David Abrahams.
  *  Copyright 2005 Rene Rivera.
  *  Distributed under the Boost Software License, Version 1.0.
- *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ *  (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
  */
 
 /*
@@ -37,6 +37,7 @@
 #include "output.h"
 
 #include <assert.h>
+#include <errno.h>
 #include <stdio.h>
 #include <sys/stat.h>  /* needed for mkdir() */
 
@@ -130,7 +131,12 @@ int file_collect_dir_content_( file_info_t * const d )
     if ( !*dirstr ) dirstr = ".";
 
     if ( -1 == ( n = scandir( dirstr, &namelist, NULL, alphasort ) ) )
+    {
+        if (n != ENOENT && n != ENOTDIR)
+            err_printf( "[errno %d] scandir '%s' failed: %s\n",
+                errno, dirstr, strerror(errno) );
         return -1;
+    }
 
     string_new( path );
     while ( n-- )
@@ -307,7 +313,7 @@ int file_collect_archive_content_( file_archive_info_t * const archive )
         char * src;
         char * dest;
 
-        size_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning.
+        int32_t ar_hdr_name_size = sizeof( ar_hdr.ar_name ); // Workaround for sizeof strncpy warning.
         strncpy( lar_name, ar_hdr.ar_name, ar_hdr_name_size );
 
         sscanf( ar_hdr.ar_date, "%ld", &lar_date );