Skip to content

Commit

Permalink
Fix compilation with GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
aristotaloss committed Feb 6, 2016
1 parent a720f4e commit 89bcac0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/compression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int Compression::Decompress(std::vector<char> &original, std::vector<char> &dest
lzma_end(strm);
return (int) strm->total_out;
} */ else if (compression_type == CompressionType::NONE) { // If no compression just copy the bytes from O to D
std::memcpy(destination.data(), original.data() + 9, original.size() - 9);
memcpy(destination.data(), original.data() + 9, original.size() - 9);
return (int) (original.size() - 9);
}

Expand Down
2 changes: 1 addition & 1 deletion src/compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "bzip2/bzlib.h"
#include <exception>
#include <stdexcept>
#include <memory>
#include <memory.h>
//#include <lzma.h>

const static char *BZIP_HEADER = "BZh1";
Expand Down
2 changes: 1 addition & 1 deletion src/index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Index::Index(FileSystem *file_system, std::string index_file) {
this->file_system = file_system;
this->index_file = std::string(new char[index_file.length() + 1]);

std::memcpy((void*) this->index_file.data(), index_file.data(), index_file.length() + 1);
memcpy((void*) this->index_file.data(), index_file.data(), index_file.length() + 1);
}

Index::~Index() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "folder_info.h"
#include <vector>
#include <string>
#include <memory>
#include <memory.h>

using namespace std;

Expand Down
8 changes: 4 additions & 4 deletions src/librsfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
# ifndef RSFS_EXPORT
# ifdef rsfs_EXPORTS
/* We are building this library */
# define RSFS_EXPORT __declspec(dllexport)
# define RSFS_EXPORT __attribute__((visibility("default")))
# else
/* We are using this library */
# define RSFS_EXPORT __declspec(dllimport)
# define RSFS_EXPORT __attribute__((visibility("default")))
# endif
# endif

# ifndef LIBRSFS_NO_EXPORT
# define LIBRSFS_NO_EXPORT
# define LIBRSFS_NO_EXPORT __attribute__((visibility("hidden")))
# endif
#endif

#ifndef LIBRSFS_DEPRECATED
# define LIBRSFS_DEPRECATED __declspec(deprecated)
# define LIBRSFS_DEPRECATED __attribute__ ((__deprecated__))
#endif

#ifndef LIBRSFS_DEPRECATED_EXPORT
Expand Down

0 comments on commit 89bcac0

Please sign in to comment.