* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
- * Depends on glibc 2.10 for getline().
*/
#include <sys/types.h>
#include <babeltrace/ctf/types.h>
#include <babeltrace/compat/uuid.h>
#include <babeltrace/compat/utc.h>
+#include <babeltrace/compat/stdio.h>
#include <babeltrace/endian.h>
#define NSEC_PER_USEC 1000UL
if (!ctf_move_pos(&dummy, tlen * CHAR_BIT))
packet_filled = 1;
if (packet_filled || ctf_pos_packet(&dummy)) {
- ctf_pos_pad_packet(pos);
+ if (ctf_pos_pad_packet(pos))
+ goto error;
write_packet_header(pos, s_uuid);
write_packet_context(pos);
if (attempt++ == 1) {
write_packet_header(&pos, s_uuid);
write_packet_context(&pos);
for (;;) {
- len = getline(&line, &linesize, input);
+ len = bt_getline(&line, &linesize, input);
if (len < 0)
break;
nl = strrchr(line, '\n');