Skip to content

Commit 7549beb

Browse files
committed
- Fixed build on FreeTDS 0.82
1 parent 5bc7e59 commit 7549beb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/pdo_dblib/dblib_driver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,13 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
274274
,{"5.0",DBVERSION_70} /* FIXME: This does not work with Sybase, but environ will */
275275
,{"6.0",DBVERSION_70}
276276
,{"7.0",DBVERSION_70}
277+
#ifdef DBVERSION_71
277278
,{"7.1",DBVERSION_71}
279+
#endif
280+
#ifdef DBVERSION_72
278281
,{"7.2",DBVERSION_72}
279282
,{"8.0",DBVERSION_72}
283+
#endif
280284
,{"10.0",DBVERSION_100}
281285
,{"auto",0} /* Only works with FreeTDS. Other drivers will bork */
282286

@@ -361,9 +365,11 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
361365
/* allow double quoted indentifiers */
362366
DBSETOPT(H->link, DBQUOTEDIDENT, "1");
363367

368+
#ifdef DBSETLDBNAME
364369
if (vars[3].optval) {
365370
DBSETLDBNAME(H->login, vars[3].optval);
366371
}
372+
#endif
367373

368374
ret = 1;
369375
dbh->max_escaped_char_length = 2;

0 commit comments

Comments
 (0)