File have_atomic.patch of Package bulk_extractor

Index: bulk_extractor-1.4.0/src/be13_api/feature_recorder.cpp
===================================================================
--- bulk_extractor-1.4.0.orig/src/be13_api/feature_recorder.cpp
+++ bulk_extractor-1.4.0/src/be13_api/feature_recorder.cpp
@@ -642,7 +642,15 @@ std::string feature_recorder::carve(cons
      * that's okay, because the second one will fail.
      */
 
+#ifdef HAVE__SYNC_ADD_AND_FETCH
     uint64_t this_file_number = __sync_add_and_fetch(&file_number,1);
+#else
+    uint64_t this_file_number = 0;
+    {
+        cppmutex::lock lock(Mf);
+        this_file_number = file_number++;
+    }
+#endif
 
     std::string dirname1 = outdir + "/" + name;
     std::stringstream ss;
Index: bulk_extractor-1.4.0/src/be13_api/plugin.cpp
===================================================================
--- bulk_extractor-1.4.0.orig/src/be13_api/plugin.cpp
+++ bulk_extractor-1.4.0/src/be13_api/plugin.cpp
@@ -672,7 +672,9 @@ void be13::plugin::process_sbuf(const cl
         std::stringstream ss;
         ss << "<buflen>" << sp.sbuf.bufsize  << "</buflen>";
         if(alert_recorder && dup_data_alerts) alert_recorder->write(sp.sbuf.pos0,"DUP SBUF "+md5.hexdigest(),ss.str());
+#ifdef HAVE__SYNC_ADD_AND_FETCH
         __sync_add_and_fetch(&dup_data_encountered,sp.sbuf.bufsize);
+#endif
     }
 
     /* Determine if the sbuf consists of a repeating ngram. If so,
openSUSE Build Service is sponsored by