浏览代码

db_text: rpc command query requires linux for open_memstream()

- use the os define to enable/disable it at compile time
Daniel-Constantin Mierla 8 年之前
父节点
当前提交
1980c2c302
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/modules/db_text/db_text.c

+ 4 - 0
src/modules/db_text/db_text.c

@@ -164,6 +164,7 @@ static const char *rpc_query_doc[2] = {
 
 /* rpc function implementations */
 static void rpc_query(rpc_t *rpc, void *ctx) {
+#ifdef __OS_linux
         str sql;
         db1_con_t *con;
         db1_res_t* _r;
@@ -226,6 +227,9 @@ static void rpc_query(rpc_t *rpc, void *ctx) {
 
 end:
         dbt_close(con);
+#else
+		rpc->fault(ctx, 500, "Command available on Linux only");
+#endif
 }
 
 static rpc_export_t rpc_methods[] = {