Skip to content

Commit

Permalink
Fix MSVC compile issue related with ssize_t (#2027)
Browse files Browse the repository at this point in the history
Fix MSVC compile issue related with ssize_t
  • Loading branch information
denix56 authored and SergioRAgostinho committed Oct 14, 2017
1 parent 9887bad commit f4d6203
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions io/include/pcl/io/impl/pcd_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@
# define pcl_close(fd) _close(fd)
# define pcl_lseek(fd,offset,origin) _lseek(fd,offset,origin)
# define pcl_read(fd,dest,size) _read(fd,dest,size)
/* ssize_t is also not available (copy/paste from MinGW) */
#ifdef _MSC_VER
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#undef ssize_t
#ifdef _WIN64
typedef __int64 ssize_t;
#else
typedef int ssize_t;
#endif /* _WIN64 */
#endif /* _SSIZE_T_DEFINED */
#endif /* _MSC_VER */
#else
# include <sys/mman.h>
# define pcl_open open
Expand Down

0 comments on commit f4d6203

Please sign in to comment.