Skip to content

Commit

Permalink
Fix a compatibility issue caused but _res macro definition
Browse files Browse the repository at this point in the history
Some public header defines _res macro (resolv.h header on
some Linux).
For compatibility reasons in sybdb.h (which is installed)
we just undefine the offending macro.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
  • Loading branch information
freddy77 committed Aug 9, 2017
1 parent 86fd7ec commit 39d90a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/freetds/tds.h
Expand Up @@ -139,7 +139,7 @@ typedef struct
TDS_INT date; /**< date, 0 = 1900-01-01 */
TDS_SMALLINT offset; /**< time offset */
TDS_USMALLINT time_prec:3;
TDS_USMALLINT _res:10;
TDS_USMALLINT _tds_reserved:10;
TDS_USMALLINT has_time:1;
TDS_USMALLINT has_date:1;
TDS_USMALLINT has_offset:1;
Expand Down
2 changes: 2 additions & 0 deletions include/sybdb.h
Expand Up @@ -309,6 +309,8 @@ typedef struct
DBINT date; /**< date, 0 = 1900-01-01 */
DBSMALLINT offset; /**< time offset */
DBUSMALLINT time_prec:3;
// fix a problem with some public headers defining _res
#undef _res
DBUSMALLINT _res:10;
DBUSMALLINT has_time:1;
DBUSMALLINT has_date:1;
Expand Down

0 comments on commit 39d90a9

Please sign in to comment.