Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
dbede305
Commit
dbede305
authored
Jul 06, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #306 from carlosmn/development
Fix network MSYS compilation
parents
1af935a3
39cdf272
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
CMakeLists.txt
+9
-1
src/netops.c
+2
-1
src/transport_git.c
+0
-10
No files found.
CMakeLists.txt
View file @
dbede305
...
...
@@ -53,7 +53,10 @@ IF (MSVC)
SET
(
CMAKE_C_FLAGS_DEBUG
"/Od /DEBUG /MTd"
)
SET
(
CMAKE_C_FLAGS_RELEASE
"/MT /O2"
)
ELSE
()
SET
(
CMAKE_C_FLAGS
"-Wall -Wextra -fPIC"
)
SET
(
CMAKE_C_FLAGS
"-Wall -Wextra"
)
IF
(
NOT MINGW
)
# MinGW always does PIC and complains if we tell it to
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
ENDIF
()
SET
(
CMAKE_C_FLAGS_DEBUG
"-g -O0"
)
SET
(
CMAKE_C_FLAGS_RELEASE
"-O2"
)
ENDIF
()
...
...
@@ -86,6 +89,11 @@ ENDIF ()
# Compile and link libgit2
ADD_LIBRARY
(
git2
${
SRC
}
${
SRC_ZLIB
}
)
IF
(
WIN32
)
TARGET_LINK_LIBRARIES
(
git2 ws2_32
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
git2
${
CMAKE_THREAD_LIBS_INIT
}
)
SET_TARGET_PROPERTIES
(
git2 PROPERTIES VERSION
${
LIBGIT2_VERSION_STRING
}
)
SET_TARGET_PROPERTIES
(
git2 PROPERTIES SOVERSION
${
LIBGIT2_VERSION_MAJOR
}
)
...
...
src/netops.c
View file @
dbede305
...
...
@@ -23,11 +23,12 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _
MSC_VER
#ifndef _
WIN32
# include <sys/types.h>
# include <sys/socket.h>
# include <netdb.h>
#else
# define _WIN32_WINNT 0x0501
# include <winsock2.h>
# include <Ws2tcpip.h>
# pragma comment(lib, "Ws2_32.lib")
...
...
src/transport_git.c
View file @
dbede305
...
...
@@ -23,16 +23,6 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _MSC_VER
# include <sys/types.h>
# include <sys/socket.h>
# include <netdb.h>
#else
# include <winsock2.h>
# include <Ws2tcpip.h>
# pragma comment(lib, "Ws2_32.lib")
#endif
#include "git2/net.h"
#include "git2/pkt.h"
#include "git2/common.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment